403 error on api call

when my node app that calls a rapid api with an api key works fine on localhost but when the server is deployed on render, the pages are rendered but the api call gives 403.
how do I fix it.
thanks in advance

Hi there,

If you’re receiving 403s from an external API, I’d suggest double checking that you’ve entered the API key correctly. Since the 403 is coming from that service provider, you might also check with them to get more information on why the calls are failing.

Regards,

Matt

Hey did you get how to correct this, because I am also getting the same problem, and I am trying to scrap the site and the site is not under my control.

Yeah I actually resolved it. My problem was with adding the environment variables on render. It was the same way as in .env file. But then I did read a lot of other articles regarding this. So u can briefly explain your issue, i will be more than happy to be of any help

so for example I try an axios get request with url ‘https://new9.gdtot.cfd/file/8521363135’ on my local pc, it works but when I upload same code on render, it fails with a 403 error.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.