I am working on a program that interfaces with a web API. Mathematica runs perfectly fine for a few hours and then, after a while, will sometimes return:

The request to URL https://api.polygon.io/v2/aggs/ticker/USB/range/1/minute/2017-04-05/2017-04-06?apiKey=personalKey was not successful. The server returned the HTTP status code 502.

What I find strange about this is that I can just follow the link to the website (I changed the apiKey) and have no problems. Why am I receiving this error in Mathematica, but not when I interface with the API through a web browser?



closed as off-topic by m_goldberg, Kuba Apr 6 at 6:31

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "The question is out of scope for this site. The answer to this question requires either advice from Wolfram support or the services of a professional consultant." – m_goldberg, Kuba
If this question can be reworded to fit the rules in the help center, please edit the question.


Alright, I got into contact with the support for the API, and the problem was resolved on their end. Apparently, it was an error in the routers' networking configuration.


Not the answer you're looking for? Browse other questions tagged or ask your own question.