Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

403 Forbidden Error on PythonAnywhere When Accessing External API (LimeSurvey)

  • siddharthhemnani.ad2b
  • siddharthhemnani.ad2b's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 months 4 weeks ago #266470 by siddharthhemnani.ad2b
Please help us help you and fill where relevant:
Your LimeSurvey version: 6.6.1
Own server or LimeSurvey hosting: Own Server
Survey theme/template:  Fruity TwentyThree
=================
I'm running a Django application on PythonAnywhere, and I'm trying to access the LimeSurvey RemoteControl API to retrieve survey responses. I’ve written a Python script that sends a POST request to the LimeSurvey API endpoint to get a session key and later fetch survey responses.

However, when I run the script as a function within a Django View on PythonAnywhere, I encounter the following error:

```
requests.exceptions.ProxyError: HTTPSConnectionPool(host='siddharthhemnani-ad2b.limesurvey.net', port=443): Max retries exceeded with url: /admin/remotecontrol (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden')))
```

It appears that PythonAnywhere blocks certain outbound internet access, which might be causing this issue.

What I’ve Tried:
- Running the script locally (it works fine on my local machine).
- Disabling SSL verification with `verify=False` in the `requests` call.

What I Need Help With:
I requested for this endpoint prelead-admin.limesurvey.net/admin/remotecontrol to be added to the list of allowed endpoints at PythonAnywhere support but they said it can not be done because of security reasons. However if it is cleared that there are no security issues then they would add this endpoint.

Any guidance or suggestions would be greatly appreciated!

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
2 months 3 weeks ago #266500 by DenisChenu
ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden')))

Seems you have a proxy, seems not related to limesurvey.net

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.

Please Log in to join the conversation.

Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose