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.