Forums

403 Forbidden For one signals notificacions

In my application when creating objects of a model, I call the one signal api to send push notifications, when I had the free plan it told me that because it was the free plan I couldn't do it, I paid for the next plan and I still get the following error:

{'error': "HTTPSConnectionPool(host='api.onesignal.com', port=443): Max retries exceeded with url: /notifications?c=push (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 403 Forbidden')))"}

I want to know if I can consume the service or if I have to migrate my application to a host other than pythonanywhere.

Are you running this in a web app or console? If it's a console, you need to start a new one after you upgrade.

I'm doing it on the web, from the admin, when I create an object of a model, I call one signal to send push notifications to the registered devices, but when I do it I get that error, can you help me, guide me or confirm if I can do it?

I'm reviewing other posts, and the problem is that they don't have one signal in their allow list, which causes a block. I'm sharing the API documentation to see if they can add it to the list of allowed URLs, thanks:

https://documentation.onesignal.com/reference/rest-api-overview

@adminrosarioscore Please request it here: https://help.pythonanywhere.com/pages/RequestingAllowlistAdditions/

The 403 error might be due to their network restrictions. Try reaching out to their support for clarification, or consider using a different hosting option if push notifications are a crucial part of your app.

Request Error: HTTPSConnectionPool(host='www.tradeindia.com', port=443): Max retries exceeded with url: /utils/my_inquiry.html?userid=*&profile_id=**&key=**&from_date=2025-01-23&to_date=2025-01-24&limit=10&page_no=1 (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden'))) please provide support.

www.tradeindia.com is not on the allow list. If the site has a publicly documented API, you can request that it be added to the allow list here https://help.pythonanywhere.com/pages/RequestingAllowlistAdditions/

The PythonAnywhere might blocking the connection to the OneSignal API. Try reaching out to their support to see if there's a specific issue with proxy settings on your current plan.

@luthan You need to follow https://help.pythonanywhere.com/pages/RequestingAllowlistAdditions/