Question

403 errors from DO to iTunes API

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.

Show comments

Submit an answer

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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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.

View the original comment