Keep getting an error in PythonAnywhere while using Paste.ee api

Question:

I am using the paste.ee api in my application but I keep getting the following error:

requests.exceptions.ProxyError: HTTPSConnectionPool(host=’api.paste.ee’, port=443): Max retries exceeded with url: /v1/pastes (Caused by ProxyError(‘Cannot connect to proxy.’, OSError(‘Tunnel connection failed: 403 Forbidden’)))

The code works fine on my local machine but I get the above error here. Can somebody help me with this?

Asked By: Shishir

||

Answers:

According to the documentation, you’ll need to supply an API key to paste.ee, otherwise you’ll get a 403 error (which is what you seem to be getting).
The documentation has a section mentioning how you get an API key.

Answered By: Adid

Are you a free user? Free users on PythonAnywhere have restricted internet access to whitelisted domains (usually open and public APIs). If the endpoint you’re trying to access is not whitelisted yet, you may request adding it by providing a link do the official documentation to the staff (on forums or via email).

Answered By: caseneuve
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.