Reputation: 3
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?
Upvotes: 0
Views: 803
Reputation: 476
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).
Upvotes: 0
Reputation: 1584
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.
Upvotes: 0