Forums

OSError: Tunnel connection failed: 403 Forbidden

Trying to send a simple request<br> Gettinga tunnel connection failed error.<br> Here's the code used.<br><br>

from urllib import request

data = parse.urlencode({"text": message}).encode()
req = request.Request(f"https://api.chanify.net/v1/sender/{token}", data=data)
request.urlopen(req)

<br> It's for a simple text message request which pushes to my phone via an app called Chanify. Docs page here: https://github.com/chanify/chanify <br> does it need to be whitelisted?<br><br>


raise OSError(f"Tunnel connection failed: {code} {message.strip()}") OSError: Tunnel connection failed: 403 Forbidden


No problem. I have added api.chanify.net to the whitelist.