PythonAnywhere Forums

Problem connecting to the dropbox API

Just started playing around with the free version of PythonAnywhere and so far it's great! However, I've got one problem. While trying to create a simple webapp that interfaces with Dropbox I receive the following error:

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.dropboxapi.com', port=443): Max retries exceeded with url: /2/files/list_folder (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden',)))

After taking a look at your whitelist it appears that dropboxapi.com isn't in there, could that be the reason? If so is it possible to whitelist that URL?

Thanks for spotting that. Looks like they added a new endpoint while we weren't looking. I have added it to the whitelist.

Thanks for the quick reply! api.dropboxapi.com seems to be working now. I've noticed just now that Dropbox apparently also uses content.dropboxapi.com for communicating with the API. A quick look at the Dropbox API documentation suggests these are the only two endpoints, but I'm not 100% sure. Again thanks for the help.

Looks like there's another one: notify.dropboxapi.com. Presumably for some sort of ... notifications. I've added it and content.

im finding same problem with https://control.msg91.com/api/

please look into the matter

Is there official API documentation for that site? We only whitelist sites with official APIs.

yes there is, it is an api for sending bulk sms

http://api.msg91.com/apidoc/ https://msg91.com/sms-for-developers

.

That looks like the endpoint for their API is api.msg91.com, so I've whitelisted that. I don't see any reference to control.msg91.com, though...

yup that worked for me thank you

Great, thanks for confirming!

I am facing the same issue. This is the error I got:

HTTPSConnectionPool(host='api.projectoxford.ai', port=443): Max retries exceeded with url: /vision/v1.0/ocr?language=en&detectOrientation=True (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden',)))

Could you help please.

Okay- we have added api.projectoxford.ai to the whitelist for you!

Thanks mate, it worked.

I have a same issue when i try connect to chatwork api. (bow)

HTTPSConnectionPool(host='api.chatwork.com', port=443): Max retries exceeded with url: /v2/rooms/64195312/members (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden',)))

That's not on the whitelist. Send a link to the API docs and we'll consider adding it.

hi, i have the problem, in my local terminal its work, but not here:

HTTPSConnectionPool(host='www.packtpub.com', port=443): Max retries exceeded with url: /packt/offers/free-lea rning (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden',)))

hi, i have the problem, in my local terminal its work, but not here:

HTTPSConnectionPool(host='www.packtpub.com', port=443): Max retries exceeded with url: /packt/offers/free-lea rning (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden',)))

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

i am also having the same problem HTTPSConnectionPool(host='twilix.exotel.in', port=443): Max retries exceeded with url: /v1/Accounts/none5129/Calls/connect.json (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden',)))

api link https://support.exotel.in/support/solutions/folders/92360 you can contact me at shubhamtrivedi95@gmail.com

okay- we have added twilix.exotel.in to the whitelist.

HTTPSConnectionPool(host='api-voice.solutionsinfini.com', port=443): Max retries exceeded with url: /v1/?api_key=A0f3702ddba4f7eb9056dbbd216ee275e&method=voice.call&output=json&numbers=7977347291&play=ivr:21313 (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden',))) can you this also sir. api docs is available here https://www.solutionsinfini.com/voice-api

Ok. I've added api-voice.solutionsinfini.com to the whitelist.

Would you please have a look on this problem? ConnectionError: HTTPSConnectionPool(host='www.icc-cricket.com', port=443): Max retries exceeded with url: /rankings/mens/team-rankings/odi (Caused by ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 403 Forbidden',)))

That error message means that you're trying to connect from a free account to a website that's not on our whitelist. If the site has an official documented API then we can add it to the list -- just send us a link to the API documentation.

Can you please also add this API, to the whitelist?

requests.exceptions.ProxyError: HTTPSConnectionPool(host='wall.alphacoders.com', port=443): Max retries exceeded with url: /api2.0/get.php?term=despicable+me+2&method=search (Caused by ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 403 Forbidden',)))

Here's the API documentation for it : https://wall.alphacoders.com/api.php

It's a popular wallpaper providing service.

Have added that to the whitelist now, let us know if it works OK?

It works fine now, thanks for adding it.

I have got another problem now :

<HTML>\n  <HEAD>\n     Access Denied\n  </HEAD>\n<BODY>\n\n<h1>Access Denied</h1>\n\n<p>\nAccess to arbitrary websites is not available from free accounts;\nyou can only access sites that are on our\n<a href="http://www.pythonanywhere.com/whitelist">whitelist</a>.\nIf you want to suggest something to add to our whitelist\ndrop us a line at support@pythonanywhere.com.  It will have\nto have an official public API.\n</p>\n\n\n<p>\nAlternatively, you can sign up for a paid account at\n<a href="http://www.pythonanywhere.com/account/">http://www.pythonanywhere.com/account/</a>\n</p>\n<p>\n If you have already got a paid account and you\'re still getting this messge,\nyou may need to reload your web app (from the "Web" tab) or restart\n your consoles.  If that doesn\'t help, drop us a line at support@pythonanywhere.com.\n</p>\n\n</BODY>

It is an mp3 providing API. Here's the documentation : http://www.youtubeinmp3.com/api/

okay- we have added www.youtubeinmp3.com to the whitelist for you

Hi, can you please add these APIs to your whitelist?

https://api.rss2json.com/v1/api.json?rss_url=http%3A%2F%2Fwww.khabaronline.ir%2FRSS, https://api.rss2json.com/v1/api.json?rss_url=http%3A%2F%2Fwww.khabaronline.ir%2FRSS%2FService%2Fcomic, https://api.rss2json.com/v1/api.json?rss_url=http%3A%2F%2Fwww.khabaronline.ir%2FRSS%2FService%2Fsociety, https://api.rss2json.com/v1/api.json?rss_url=http%3A%2F%2Fkhabaronline.ir%2FRSS%2FService%2Feconomy, https://api.rss2json.com/v1/api.json?rss_url=http%3A%2F%2Fwww.khabaronline.ir%2FRSS%2FService%2Fsport, https://api.rss2json.com/v1/api.json?rss_url=http%3A%2F%2Fwww.khabaronline.ir%2FRSS%2FService%2FWorld, https://api.rss2json.com/v1/api.json?rss_url=http%3A%2F%2Fwww.khabaronline.ir%2FRSS%2FService%2Fculture

Have added that now, let us know ifi it works ok?

Thank you it works perfectly!

:)

requests.exceptions.ProxyError: HTTPSConnectionPool(host='api.knack.com', port=443): Max retries exceeded with url: /v1/ap plications/5999240e9367f42c442093c8/assets/file/upload (Caused by ProxyError('Cannot connect to proxy.', error('Tunnel con nection failed: 403 Forbidden',)))

Could you please add that site to whitelist? The API docs are at www.knack.com/developer-documentation

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

Thanks Harry. It worked :)

:)

Same error! https://api.unsplash.com . Please add this api to whitelist

OK i've added that now let us know if it works OK?

Thank you so much. Its working Now

Excellent, thanks for confirming!

Please add etherscan.io to the whitelist

can you provide a link to their documentation and a list of api endpoint subdomains?

Here is the API documentation:

https://etherscan.io/apis

OK -- that looks like the endpoint is api.etherscan.io, so I've whitelisted that.

Alright. Thanks

No problem!

Hi, can you please add api.shutterstock.com in the whitelist.

Link to api documentation is here: https://developers.shutterstock.com/api/v2

ok that's added now, let us know if you see any problems with it.

HTTPSConnectionPool(host='image.shutterstock.com', port=443): Max retries exceeded with url: /display_pic_with_logo/839950/291471299/stock-photo-french-bulldog-dog-very-sick-with-ice-pack-or-bag-on-head-eyes-closed-and-suffering-thermometer-291471299.jpg (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden',)))

Please, add image.shutterstock.com in white list, as well.

I'll have to check with my colleagues about that when we're back in the office on Monday. In the meantime, if you can provide a full list of all the subdomains on shutterstock.com that you think you might need?

Ok, please, whitelist these domains.

These subdomains of shutterstock:

https://image.shutterstock.com

https://thumb10.shutterstock.com

https://thumb7.shutterstock.com

https://thumb1.shutterstock.com

https://thumb9.shutterstock.com

http://download.shutterstock.com

And these ones for getting videos and audios from shutterstock (I indicate links to sutterstock api documentation, where they are used in responses from shutterstock):

https://ak.picdn.net link

https://ak5.picdn.net link

https://il1.picdn.net link

https://il9.picdn.net link

https://ak4.picdn.net link

https://il2.picdn.net link

ok have added those now. let us know if there are any others?

Thanks a lot! All is fine)

:-D