Forums

Max retries exceeded with url...Tunnel connection failed: 403 Forbidden

Hello, I am trying to use Python Flask with Exponent (getexponent.com). I received the following stack trace:

ProxyError: HTTPSConnectionPool(host='exp.host', port=443): Max retries exceeded with url: /--/api/notify/[REDACTED] (Caused by ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 403 Forbidden',)))

I suspect this may be a whitelist problem. I was wondering if this could be added to the whitelist so that I can attempt to get my app working. I think the API is trying to connect to https://exp.host.

Thanks!

I don't see any API docs for a web service. All I see is docs on how to write code for mobile platforms. If I'm wrong, post a link to the docs for the API you're trying to access.

Sure thing. It isn't very explicit because it is built in through a wrapper of theirs. It seems that the wrapper itself calls this API. Without the API, I can't use their wrapper:

So if you go here, you will see that they show you how to use push notifications (which is what I am trying to do): https://docs.getexponent.com/versions/v12.0.0/guides/push-notifications.html

ctrl + f for: exponent-server-sdk-python

That is a link to their github to their python module that you can install: https://github.com/exponent/exponent-server-sdk-python

In line 8 within this file is where the variable BASE_URL points to exp.host: https://github.com/exponent/exponent-server-sdk-python/blob/master/exponent_server_sdk/init.py

This is called by their method "publish" in line 28.

Thanks!

Ok. That's pushing it a bit, but I've add that to the whitelist.

Thanks! You are awesome!