Forums

OSError: Tunnel connection failed: 403 Forbidden

I want to run a daily task that gets some small .json files and uses them to update a .txt file in my folder. To do this I use a wrapper library for the API I am accessing (brawlstats).

Running the task I get the error:

OSError: Tunnel connection failed: 403 Forbidden

As well as

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.brawlapi.cf', port=443): Max retries exceeded with url: /v1/leaderboards/players?count=200&brawler=shelly (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden')))

I'd like to know how I could run daily tasks with outbound internet usage? Would it work if I bought a premium membership?

A paid account can be used to access any website, but there is a whitelist of APIs that can be accessed from free accounts. The PythonAnywhere devs can add any requested API to the whitelist. You must also provide a link to the API's documentation to request it.

+1 to what @dull says -- @brawlrank, if that's a documented public API that you're trying access, just send us a link to the API docs and we'll add it to the whitelist.

From my pythonAnywhere app I send a get request to a external webserver and in the console i get following error message, see below. Sending the same request in my mozilla forefox webbrowser I get a JSON response. Can you add the url to your pythonAnywhere white-list or do I need a paid account? Mayn thanks for your help. Fred59

Traceback (most recent call last): File "/home/Fred59status/mysite/flask_app.py", line 41, in <module> response_status = requests.get(urlAPI + order_id) # raise OSError("Tunnel connection failed: %d %s" % (code, OSError: Tunnel connection failed: 403 Forbidden File "/usr/lib/python3.8/site-packages/requests/api.py", line 75, in get return request('get', url, params=params, kwargs) File "/usr/lib/python3.8/site-packages/requests/api.py", line 60, in request return session.request(method=method, url=url, kwargs) File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 533, in request resp = self.send(prep, send_kwargs) File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 646, in send r = adapter.send(request, kwargs) File "/usr/lib/python3.8/site-packages/requests/adapters.py", line 510, in send raise ProxyError(e, request=request) requests.exceptions.ProxyError: HTTPSConnectionPool(host='www.vitaland.ch', port=443): Max retries exceeded with url: /scripts/get_order_data.php?api_key=XXXXXXXXXXXXXXXX &order_id=200496459 (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden')))

if you can show us public api documentation, then we can add it to the whitelist. Otherwise you may need to get a paid account.

Hi there!

Could you put url https://cti-taxii.mitre.org of Mitre TAXII API in PA Proxy Whitelist?

I'm getting this proxy error:

HTTPSConnectionPool(host='cti-taxii.mitre.org', port=443): Max retries exceeded with url: /stix/collections/95ecc380-afe9-11e4-9b6c-751b66dd541e/ (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden',)))

It's the Mitre service (Taxii), about cybersecurity

Link to *Public documentations about Mitre Taxii Service: *

No problem. I've added that to the whitelist.

Hi there Could you please add the url "https://www.worldometers.info/coronavirus/" "https://www.worldometers.info/coronavirus/country/ethiopia/" to the whitelist..

We can only whitelist sites with an official public API -- if that site has one, could you post a link to the API documentation?

https://www.who.int/data/gho/info/athena-api Ok...what about this...

Sure, I've whitelisted the host described on that page, apps.who.int.

can you whitelist 'https://www.worldometers.info/coronavirus/'

We can only whitelist sites with an official public API -- if that site has one, could you post a link to the API documentation?

Please! Can you add to whitelist https://developerhub.alfabank.by/.
Error: HTTPSConnectionPool(host='developerhub.alfabank.by', port=8273): Max retries exceeded with url: /token/ (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden',)))

It doesn't look like that will work, since that API appears to use a non-standard port. Free accounts can only connect out on ports 80 and 443 (the standard http and https ports), so adding that to the whitelist would have no effect.

if I switch to Hacker I be able to use request HTTPSConnectionPool(host='developerhub.alfabank.by', port=8273) without errors ?

Yes, if the errors you're getting are because it cannot connect to the site.

How quickly will my website work if I pay now and do I need to change something in the settings?

When you upgrade you need to restart consoles, web apps, etc. for it to take effect

Is it possible to whitelist my bot’s website so that I can use my API or do I need to make documentation?

When we whitelist a site, it's whitelisted for all free users (including people using the console on the front page of python.org), not just for one account. So your bot would need to offer a general public API that people could use before we could whitelist it.

Please! Can you add to whitelist https://api.sypexgeo.net/json/ requests.exceptions.ProxyError: HTTPSConnectionPool(host='api.sypexgeo.net', port=443): Max retries exceeded with url: /json/ (Caused by ProxyError('Cannot connect to proxy.', OSErr or('Tunnel connection failed: 403 Forbidden'))) https://sypexgeo.net/ru/api/ - official Rest API Doc Thank you

Sure! That's whitelisted now.

Can I ask you to add this API to the list? https://twelvedata.com/docs

And one more: https://currency.com/api

No problem,

    api-adapter.backend.currency.com
    api.twelvedata.com

were added to the whitelist

Thank you. Eeverything works fine.

Thanks for confirming!

please add https://ghibliapi.herokuapp.com too

It's done

Will you please add "api.segment.io" to the whitelist? https://segment.com/docs/connections/sources/catalog/libraries/server/http-api/

We've already added that in response to your email.

please add this https://www.worldometers.info/coronavirus/#countries

Hello Sir, Can you please add "https://api.elis.rossum.ai/docs/#getting-started" to whitelist. I am getting the following error: HTTPSConnectionPool(host='api.elis.rossum.ai', port=443): Max retries exceeded with url: /v1/queues/46510/upload (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden')))

Sure, we have added api.elis.rossum.ai to the whitelist.

@stonieplus please provide the api documentation if you want the url to be considered for our whitelist.

Thanks Sir! :)

please add this to whitelist "https://covid-19india-api.herokuapp.com/all" api doc https://covid-19india-api.herokuapp.com/

No problem. I have added that to the whitelist.

Hi, I'm having the same trouble here. Something like "OSError: Tunnel connection failed: 403 Forbidden" It'd nice if you could add this page to the whitelist. I'm not very into programming stuff, just learning, so I don't know what the API of this page is, but at least I can give you the page, it's a page from an argentinian university, so I think it's nothing malicious. The page is https://www.info.unlp.edu.ar/ . Thanks.

I don't see any reference to an API on that page, so it's probably not a candidate for the whitelist.

Hi, I think I may having the same problem. My apps gets some data from UNIDATA (https://www.unidata.ucar.edu/), via siphon library, and I get the same error : Max retries exceeded with url: /thredds/catalog.xml (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden')))

Siphon API documentation: https://unidata.github.io/siphon/latest/api/index.html

Would it be possible to add this site to the whitelist? I am using a free account, and it's for learning purposes Kind Regards, Guillermo.

Is there a page on www.unidata.ucar.edu itself that says that the site is an official public API of some kind? Or alternatively, a link from there saying that https://unidata.github.io/siphon/ is something that they themselves maintain?

thanks, Maybe this is what you are asking? https://unidata.github.io/siphon/latest/ Kind regards, Guillermo

Hi! Can you guys please add Carris to the whitelist? It is Lisbon, Portugal bus provider.

API: https://carris.tecmic.com/api/v2.9/ Documentation: https://carris.tecmic.com/index.html

sure, we have added carris.tecmic.com to the whitelist for you.

@gguevara we would need something on www.unidata.ucar.edu not unidata.github.io

Pls can you add www.flipkart.com to whitelist.. Or If I taks hacker subscription so that i can access it through python

Pls can you add www.flipkart.com to whitelist.. Or If I taks hacker subscription so that i can access it through python and bit.ly

We can only add sites if they have official public APIs; we've already whitelisted Flipkart and Bitly's APIs; the domains you list aren't part of those APIs.

Paid accounts have unrestricted Internet access and can access sites that are not on the whitelist.

if they are whitelisted but still i get error 403 so after taking pythonanywhere hacker subscription ca i access it? pls reply

if they are not part of apis so after subscription can i access it ?

If you upgrade to a paying account, we do not limit your outbound internet connections. However, if you are trying to say scrape a site, that site can still choose to block you even though we don't do anything on our end.

If we already have the api on our whitelist and you are getting a 403, then you should probably try to fix it from a free account first.

Hello, could you please add https://dashboard.blomp.com/dashboard/ to whitelist. His Api doc was https://www.blomp.com/ . Thank you

That does not look like API documentation to me (it just looks like the front page of a service) and I couldn't see anything that looked like it would link to API documentation.

Hello, could you please add https://dashboard.blomp.com/dashboard/ to whitelist. It just a website that offer cloud storage. I don't know if his Api doc was www.blomp.com/privacy-policy/. Thank you

Hello, dear admins. May I ask you to whitelist url https://thispersondoesnotexist.com/ please? API: https://github.com/David-Lor/ThisPersonDoesNotExistAPI This site generates random faces, and I wrote a bot that adds them to instagram so that later they can be used for AI training.

But I am getting error: requests.exceptions.ProxyError: HTTPSConnectionPool (host = 'thispersondoesnotexist.com', port = 443): Max retries exceeded with url: / image (Caused by ProxyError ('Cannot connect to proxy.', OSError ('Tunnel connection failed: 403 Forbidden ')))

Everything works fine on my computer

Hello, could you please add https://dashboard.blomp.com/dashboard/ to whitelist. It just a website that offer cloud storage. I don't know if his Api doc was www.blomp.com/privacy-policy/. Thank you

Hello guys o/ Is it possible to add https://developer.dhl.com/api-reference/shipment-tracking#get-started-section/user-guide to your whitelist?

Cheers

it's DHL's parcels tracking API :)

@tboard -- we can only whitelist sites if they have an official public API, so if that site has one you'll need to give us a link to the API docs. If it doesn't have an API, we can't whitelist it.

@supervit -- the API needs to be an official public one, and that is just a github repository where someone has created an unofficial API.

@goldfingers95 -- sure! The docs you link to say that the API is at api-eu.dhl.com, so we've whitelisted that.

Thank you Admin. As for the https://dashboard.blomp.com/dashboard/ I asked you to add to whitelist. This is what I got from the blomp agent.

For the most part, the Blomp API is the Openstack Swift API:

https://docs.openstack.org/swift/latest/

Thanks.

What we really need is a link to some page on blomp.com specifying what the API is, and what hostname it uses.