Forums

For some reason I can't to connect external API from my Django app.

Hello. For some reason I can't to connect external API from my Django app. I have a service with webhooks and try to make request from python code. It works on my local computer, but when I deployed it in pythonanywhere i get this error message:

```python

2024-09-22 13:15:35 Internal Server Error: /api/v1/hooks/users_me_contact/#012Traceback (most recent call last):#012  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 700, in urlopen#012    self._prepare_proxy(conn)#012  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 994, in _prepare_proxy#012    conn.connect()#012  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 369, in connect#012    self._tunnel()#012  File "/usr/local/lib/python3.10/http/client.py", line 924, in _tunnel#012    raise OSError(f"Tunnel connection failed: {code} {message.strip()}")#012OSError: Tunnel connection failed: 403 Forbidden#012#012During handling of the above exception, another exception occurred:#012#012Traceback (most recent call last):#012  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send#012    resp = conn.urlopen(#012  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 7

```

Can you help me?

Free accounts have restricted internet access and are limited to our allowlist