#403 error when performing a GET request in production

1 messages · Page 1 of 1 (latest)

pliant anchor
#

Hello! I was hoping someone could help me with an issue I am having. When running in localhost my job seems to run fine, however once I run it on production, it keeps throwing a 403 error (Request failed with status code 403) when a get request is performed in my job.

Some details about my architecture.

  • I am hosting the application on Vercel hobby plan.
  • Stack is NextJS, Typescript, Supabase

At first i thought there was something with my matched in the middle.

That matcher looks like this:

["/((?!_next/static|_next/image|favicon.ico|api/trigger).*)"],

Has anyone encountered a similar issue? Or am i forgetting something? Thanks in advance 🙂

#

403 error when performing a GET request in production

teal root
pliant anchor
#

I believe I did, my job consists of 5 separate tasks, where one is the outgoing get request which fails:

#

I already checked locally if the credentials of the api are correct, and they are. Also the environment variables in vercel are oke

teal root
#

Hmm that certainly looks like you're missing your Rapid API environment variable

#

When you change environment variables in Vercel you have to manually redeploy btw

#

You can't just change them

pliant anchor
#

Yea i know that, thats why i found it strange. I also checked by changing out the get request api to another api from a different provider and it resulted in the same error

teal root
#

Are you using just regular fetch for that request?

pliant anchor
#

Basically yes

#

Used axios, but I dont think that should matter does it?

teal root
#

No that should work

pliant anchor
#

Thanks for the help, turned out the api i was using blocked any incoming requests from the trigger.dev domain!

teal root
#

Wow that's insane, what API?

#

But the requests aren't coming from our domain, they're coming from your site