Forums

WebSocket - 403 Forbidden

I run the script in console is OK, but when set it in schedule tasks(daily):

the system return: WebSocket Non-Authenticated encountered error: Handshake status 403 Forbidden.

command: python3.9 /home/username/folder/sc.py

Dose someone know how to fix it ? thank you!!

If exactly the same script works in a console on PythonAnywhere and not in s scheduled task, that could mean that the service you're trying to reach via API is blocking our task servers.