Welcome to the LimeSurvey Community Forum

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

get_session_key , JSON-RPC with Authwebserver?

  • kunalashar
  • kunalashar's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 10 months ago - 3 years 10 months ago #198897 by kunalashar
Hello,
I'm trying to integrate LimeSurvey with my own web server through its API. My own web server has its own usernames and passwords, and my web server needs to authenticate a user through the API.

Is there a way to call the LimeSurvey get_session_key API (JSON-RPC), but not use AuthDB? (I can't use AuthLDAP). Is there a way to use, for example, Authwebserver, instead, using the Authwebserver plugin, to allow my web server to authenticate a user over the JSON-RPC API?

The following does not work:
Code:
curl --location --request POST 'https://mysurveyserver/index.php/admin/remotecontrol' --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Content-Type: text/plain' --header 'Cookie: PHPSESSID=hg4kkgne7m15du97envg834l8u' 
--data-raw '{
  "jsonrpc": "2.0",
  "method": "get_session_key",
  "params": [
    "username@email.com",
    "anydummypassword",
    "Authwebserver"
  ],
  "id": 1
}'

This returns the following error:
Code:
{"id":1,"result":{"status":"Invalid user name or password"},"error":null}


Thanks in advance.
Last edit: 3 years 10 months ago by kunalashar.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #198905 by DenisChenu
Replied by DenisChenu on topic get_session_key , JSON-RPC with Authwebserver?
No need to ask everywhere …

There are no way currently to authenticate via webserver.

You can try to construct your own system, need to regsiter to remoteControlLogin .

Currently Authwebserver plugin are not compatible with API. But remind : how you sedn information about authentification ? Since your webserver authenticate itself : you must authenticate on the same way, and LimeSurvey didn't know how you currently authenticate by webserver …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose