Forums

Proxy error when using requests in Pythonanywhere

Hi there, I'm using requests library (through Soundcloud module) and I'm having an error:

Caused by ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 403 Forbidden' when I try to access soundcloud API.

The strange thing was that in interactive mode I was able to connect it successfully with the API, but when I run my app it fails.

Best

That is very strange. Are the interactive mode and the web app definitely using the same API domain for soundcloud?

Disregard the interactive thing, entirely my fault. Just learned that the API endpoint that caused the failure was not the one I was testing in interactive mode.

The API endpoint that caused it is called /oembed (https://developers.soundcloud.com/docs/oembed) and its URL is:

http://soundcloud.com/oembed

I see in PythonAnywhere whitelist api.soundcloud.com but not soundcloud.com/oembed

Is it possible to white list this URL (since it is part of the Soundcloud API)?

Best piqoni

No problem. Try it now?

You guys rock!

It works.

Thanks

sorry for the trouble but could you please add nus.edu.sg on the whitelist because it is used for authentication BTW, i saw ntu on the list.....

If there's an official public API there, we can whitelist it -- just give us a link to the API docs.

https://wiki.nus.edu.sg/display/ivlelapi/Summary

https://wiki.nus.edu.sg/display/ivlelapi/Getting+Started

From that, it looks like ivle.nus.edu.sg is the correct API endpoint. Does that sound right to you?

yes
thanks

may i check when will it be added to the whiteliest. best regards

Would it be possible to add waterlevel.ie/data/ ? I'm trying to generate some graphs for our university kayak club webpage, link to the api docs: https://waterlevel.ie/page/api/

Both of those are whitelisted now.

Could you please whitelist https://api.darksky.net/forecast/ API and ip-api.com/json. I'm using it for rain prediction. Docs link: https://darksky.net/dev/docs

OK, have added those two. let us know if it works oK?

They work fantastically! Thanks!

Could you please whitelist script.googleusercontent.com ? I'm using pythonanywhere with google apps script web app.

ok. I looked into the documentation and I believe script.googleusercontent.com is used when google apps script returns content after you hit script.google.com, and is used as a one-time url.

I've whitelisted script.googleusercontent.com for you.

Thank you so much!!

Hi PythonAnywhere friends!

I am getting a proxy error on a simple subscribe request to the mailchimp api. Is it possible to get this whitelisted?

The endpoint im hitting looks like this: https://us14.api.mailchimp.com/3.0/lists/xxxxxxxxx/members/

Thanks so much and blue skies!

Hi there, I've added *.api.mailchimp.com to the whitelist now, let us know if it works OK!

Hi can anybody help to add api.hunterexpress.com.au into whitelist?

Thanks

I couldn't find any api docs there. Could you send a link to the api docs?

Hi Glenn here is API doc: http://staging.hunterexpress.com.au/apidocs/

Thanks

No problem. I've added both the live and the testing domains to the whitelist.

Work like a charm, thanks Glenn!

Hi guys, can you please white list https://app.asana.com/api ?

Thanks!

okay, we have whitelisted app.asana.com for you!

Hello guys, I see that you have added https://api.darksky.net/forecast/ API to the whitelist can you also please add 'https://darksky.net/details/' as well. I'm using it to get historical weather data.

Thanks.

Hi there, that second url looks designed for human consumption, not machine consumption, so that tends to rule it out from being added to the whitelist I'm afraid.

paid accounts start from just $5 tho!

Hello, Sir, I want to access KiiCloud for a datastore, could you please add it to whitelist? English Doc: https://en.kii.com API: https://api-jp.kii.com

Ok. I've added that to the whitelist.

Hello, Sir, thanks for your quick response. However, when I access the service via KiiCloud SDK, the error "urllib2.URLError: <urlopen error Tunnel connection failed: 403 Forbidden>" remains. (The url is https://api-jp.kii.com/api/oauth2/token) I also restarted the bash console. May you help me ?

Ah. Sorry about that - I didn't finish the process properly. It's working now.

Thanks, it worked.

Hello, Sir, After you set https://api-jp.kii.com into your whitelist, it worked well. But it suddenly does not work now. The request worked well these day, but now it took a very long time, and failed. Is there anything wrong with it? FYI, no problem for accessing the same KiiCloud from my local or from Google.

It seems proxy server is down.

Oh, now it works : )

Doesn't seem to work for me, I get the ProxyError all morning :(

Could you check again now? We just restarted it.

It works now, thank you!

Excellent, thanks for confirming!

It's working now. Thanks.

Thanks for confirming!

Hai, can you whitelist https://xtremetricks.net/ this link? im using it and im getting error('Tunnel connection failed: 403 Forbidden'). Please help

Send us a link to the API documentation and we'll consider it.

Give me your email id or something

please i need it... i use that website to collect information using my python script

Do they have API docs? Where are they?

No it is just a website

Unfortunately we can only whitelist sites with an official public API.

Hi, Sir, Do you have https://www.twilio.com in your whitelist?

FYI: https://www.twilio.com/docs/

yes. the full whitelist is here: https://www.pythonanywhere.com/whitelist/

Hi, Sir Can you add api.twilio.com to your white list? It seems twilio has changed its api server.

If .twilio.com is enough, I am sorry. I will check again the error log and my code.

let us know how you get on!

Hi there. I also get the ProxyError message. Could you please also whitelist the following api: host='api.opentransportdata.swiss'

Thank you for your help!

can do! can you send us a link to the api documentation?

more information re; requesting whitelist additions is available here, everyone:

http://help.pythonanywhere.com/pages/RequestingWhitelistAdditions/

Thank you for your reply. You can find the API documentation here: https://opentransportdata.swiss/en/dataset/fahrtprognose

Unfortunately, it's mostly in German. But the API is nothing else than train timetables etc. for the Swiss public transport system.

OK, have added that now, let us know if it works OK?

It works perfectly fine, thank you very much for your help!

Excellent, thanks for confirming!

Hi again. I got another tunnel error and kindly ask you to whitelist the following API: https://data.sbb.ch/api/records/1.0/search/?

The documentation can be accessed here: https://data.sbb.ch/explore/dataset/actual-data-sbb-previous-day/information/?timezone=Europe%2FZurich&refine.bpuic=8503011

Again, the API is for public transport information (a different one this time).

Thank you for your help!

Hi there, I've added that to the whitelist now, let us know if it works?

It works now, thank you so much!

:)

Can I request for Globe Labs API to be added to the whitelist too? Thank you very much!

API endpoint I'm accessing: https://developer.globelabs.com.ph/oauth/access_token

API Docs: http://www.globelabs.com.ph/docs/

Hello,Sir Here are several APIs of bitcoin exchanges in Japan.

Coincheck:

API:https://coincheck.com

DOC:https://coincheck.com/ja/documents/exchange/api

Bitflyer:

API:https://api.bitflyer.jp/v1/

DOC:https://bitflyer.jp/ja-jp/api

Bitbank:

API:https://public.bitbank.cc

        https://api.bitbank.cc/v1

DOC:https://docs.bitbank.cc

Zaif:

API:https://api.zaif.jp/tapi

DOC:https://corp.zaif.jp/api-docs/

Would you please add them in white list?

Thanks very much.

Regards

Those docs only refer to devapi.globelabs.com.ph, so I have whitelisted that.

Hello,

If you go to the "Opt-in via webform" section (http://www.globelabs.com.ph/docs/#getting-started-opt-in-via-webform), you'll see the endpoint I need (https://developer.globelabs.com.ph/oauth/access_token) in item number 6. Please whitelist that, thank you very much! :)

Ok. I see that. I have whitelisted the extra domain.

Alright, thank you!

No problem, glad to help!

can we get http://nodes.wavesnodes.com/api-docs/index.html whitelisted? port 443

i believe this is why i am getting the proxy error?

Sure! That's whitelisted now.

Can you please whitelist "https://www.pdfzorro.com/" API Docs here "https://www.pdfzorro.com/EDIT/api_anleitung.php" I am getting error accessing "https://edit.pdfzorro.com/pdf/***/**.pdf" Thank you in advance.

No problem, I've whitelisted www.pdfzorro.com. That won't cover edit.pdfzorro.com, though -- is there documentation that mentions that hostname?

Hello,Sir Here are several APIs of bitcoin exchanges in Japan.

Coincheck:

API:https://coincheck.com

DOC:https://coincheck.com/ja/documents/exchange/api

Bitflyer:

API:https://api.bitflyer.jp/v1/

DOC:https://bitflyer.jp/ja-jp/api

Bitbank:

API:https://public.bitbank.cc

    https://api.bitbank.cc/v1

DOC:https://docs.bitbank.cc

Zaif:

API:https://api.zaif.jp/tapi

DOC:https://corp.zaif.jp/api-docs/

Would you please add them in white list?

Thanks very much.

Regards

Sure! Those are whitelisted now.

Hello Sir, I want to use an API but I am getting error Tunnel Connection Failed.

API: https://api.stride.ai/doc_sentiment.json

API DOCS: https://stride.docs.apiary.io/#reference

Will you please add stride API to whitelist ?

Thank you very much.

no problem, have added that now, let us know if it works OK?

Hello . Can you whitelist "https://api.lendix.com" Thanks

Hi there, can you show us the api docs for api.lendix.com? Thanks

https://lendix.com/cgu-lendix-fr/

DOC "https://lendix.com/cgu-lendix-fr/"

Hmm, that page seems to be more a general terms and conditions page -- it mentioned api.lendix.com, but I can't see any documentation relating to the API specifically. Is there something that documents how to use the API?