omdbapi / OMDb-API

The Open Movie Database Bug Tracking
417 stars 20 forks source link

Getting 403 forbidden error #22

Closed HimanshuSaini closed 6 years ago

HimanshuSaini commented 6 years ago

I am trying to hit the APIs. Sometimes I get success and most of the times I get

Failed to load http://www.omdbapi.com/?apikey=&t=spiderman&y=&plot=short&r=jsonp: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. The response had HTTP status code 403.

And in the response of these requests, I get captcha screen where it has 'I'm not a robot' action

omdbapi commented 6 years ago

It seems you are triggering one of Cloudflare's security rules hence the captcha screen. There should be a Ray/Rule ID listed on the captcha screen that would help me determine why this is happening.

masonkuck commented 6 years ago

I also have have this problem. i found that ID AND HTML you were looking for New Text Document.txt

Cloudflare Ray ID: 3ad4d8dea75776ee

omdbapi commented 6 years ago

@masonkuck I couldn't find anything with that Ray ID in my events log, depending on how old that error was from it might have been removed. Could you repeat the issue and post the new Ray ID and I will check it immediately.

The most common thing that seems to cause this issue is not sending a user-agent header or sending fake ones like: "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)" trying to mimic a bing/google crawler.

masonkuck commented 6 years ago

Cloudflare Ray ID: 3ad6f9b395365414 Got my new id. I created the other one earlier so i think they expire quickely

I think the IP address assigned to me was used for spam bottling, according to Project Honey Pot.

I will request a new IP from GoDaddy if i can, but i dont think it will help much seeing as they are one of the biggest hosting services out there... Most IP's assigned from them are probably flagged...

omdbapi commented 6 years ago

@masonkuck email me your servers IP address and I'll whitelist it.

omdbapi commented 6 years ago

Be sure to check your servers IP address here: https://mxtoolbox.com/blacklists.aspx

Servers with shared hosting have a higher probability of being flagged on these blacklists which Cloudflare blocks. I can usually whitelist the IP and let the request through, so be sure to contact me if you are getting 403 errors.