By wutangpaul
Hi, I have a rake task that fetches information from Apple’s iTunes API.
I’m opening a bunch of URL’s in the following format: https://itunes.apple.com/lookup?id=953290300
There are 50 requests or so similar to this with different id’s.
When the task runs, it will complete the first 3 or 4 requests fine, but when then all subsequent requests will crap out with a 403 Forbidden error from Apple.
The same task runs fine on my development machine, no 403 errors. I’m using Ruby’s open-uri library on Ruby 2.
Is it possible the DO IP range is somehow being blocked by the iTunes API?
Thanks for your help.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
This question was answered by @ryanpq:
How quickly are you sending the request. Since the first few complete before you get the 403 it is possible that you are running into some type of rate-limiting on the API. If apple were blocking the IP range outright you would likely see failures on your first requests rather than after a few have completed.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.