Bad request on scheduled trigger invocation but not on web trigger

I’m writing a forge js app for cloud. My code, which includes a call to Search + JQL API. When I’m using a web trigger to test it, it’s working ok. However when invoking the exact same function using a scheduled trigger (hour), I’m getting a 400 Bad Request response. Any idea why?