New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API calls blocked #44
Comments
Thanks for reporting @rboarman. I'll take a look into this - we're currently rotating between a few User-Agent headers: camply/camply/config/api_config.py Lines 18 to 31 in 62d1a44
Hopefully this is something we'll be able to get around. |
Ahh, I have more info! This is a problem with the RIDB Database API.
The strangest thing about this issue is the RIDB Database API Landing Page is displaying the following warning:
My understanding though is that the camping-availability endpoint doesn't live on the RIDB 🤷♂️. I'll keep digging and see what I can find and follow up here |
Thank you. My calls were hitting every five minutes which should be fine right? One thing to consider, is to allow us to pass in an array of user agents via the .camply file. That might help. Thank you for the assistance!! |
@rboarman you were absolutely right. The RIDB API is kicking back the User-Agent passed from the Python Requests Package - they haven't documented this anywhere but that looks to be the problem. It's probably just a matter of time until it invalidates the attached RIDB API Key as well -- I'll look into having it choose a random API key from a few options soon. This PR (#45) adds a ton of User-Agents between Chrome, FireFox, and Safari and implements the RIDB API to randomly choose one for each API call. |
I closed this out - tests are passing on my end and the fix has ben released to PyPi and Docker. A simple |
Thank you! I'll send you a little gift. Love your library! |
Thanks - so happy you like it. I've tried to build camply to be respectful of the APIs and services it uses - this includes rate limiting and exponential backoff. However this is the first I've seen of recreation.gov pushing back and trying to crack down on tools like camply hitting their API - I wouldn't be surprised to see more bugs like this coming out in the future. |
As of yesterday, my Camply API calls to recreation.gov are blocked.
Here's the error I am getting back from Camply:
Error: 403
<TITLE>ERROR: The request could not be satisfied</TITLE>Request blocked.
403 ERROR
The request could not be satisfied.
Request blocked. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
I've tried changing ip addresses with no luck.
I've tried changing to my own API key with no luck.
Any suggestions?
Is there a way to specify a different User-Agent header?
Thanks!!
Rick
The text was updated successfully, but these errors were encountered: