get_session_key API call returns "Invalid user name or password"

Mehr
3 Monate 4 Tage her - 3 Monate 4 Tage her #184442 von alefebvr
Hello,

I'm trying to use the JSON RPC API and I've tested the following curl commands for now.
We have LimeSurvey Version 3.16.1+190314 installed.
curl --data-binary '{"jsonrpc":"2.0","method":"get_session_key","params":["adminuser","password"],"id":1}' -H 'content-type: application/json' https://our.limesurvey/index.php/admin/remotecontrol 
 
curl --data-binary '{"jsonrpc":"2.0","method":"get_session_key","params":{"username":"adminuser","password":"password"},"id":"1"}' -H 'content-type: application/json' https://our.limesurvey/index.php/admin/remotecontrol 
Both return:
{
    "error": null,
    "id": 1,
    "result": {
        "status": "Invalid user name or password"
    }
}
though I can log into the portal with the adminuser and password.

Is there anything I'm missing?
What is "id":1 (should it be 1? something else?)

Thanks in advance for your reply,

Best,

alex
Letzte Änderung: 3 Monate 4 Tage her von alefebvr.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

LimeSurvey Partners
Mehr
3 Monate 3 Tage her #184476 von DenisChenu
Your account are allowed to log in via Auth DB ? If it's a LDAP account, you must use
get_session_key(username,password,'AuthLDAP');

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Monate 3 Tage her #184483 von alefebvr
Thanks Denis, worked first time round!!

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Monate 3 Tage her #184484 von alefebvr
PS: Note that I couldn't find the documentation about this "AuthLDAP" parameter, should I open an issue for this?

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Monate 2 Tage her - 3 Monate 2 Tage her #184565 von DenisChenu

alefebvr schrieb: PS: Note that I couldn't find the documentation about this "AuthLDAP" parameter, should I open an issue for this?

Yes please, and put the link here …

The manual need to be updated (but the api autodoc is OK).

And send warning about : Auth system NEED (currently) by default a user/password

Need to update Plugin Auth information too about the new params (i must contraol param name). Then another Auth can be done (sample uniquid in php file).

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .
Letzte Änderung: 3 Monate 2 Tage her von DenisChenu.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
4 Wochen 14 Stunden her - 4 Wochen 13 Stunden her #186869 von vikrantLumiq
Hello,

I am facing the same issue for get_session_key function API. I have enabled the JSON-RPC interface and my installed LimeSurvey Version is 3.0.1+171228. I am able to log in with the same credentials through UI

Following is my curl request in which I tried adding the 'AuthLDAP' parameter too.

curl --data-binary '{"jsonrpc":"2.0","method":"get_session_key","params":["admin","password","AuthLDAP"],"id":1}' -H 'content-type: application/json' http://<myHostName.com>:<myPort>/index.php/admin/remotecontrol

Response:
{"id":1,"result":{"status":"Invalid user name or password"},"error":null}

Please help.

Note: I have tried with both the syntax and versions for jsonrpc (1.0 and 2.0) without any help
Letzte Änderung: 4 Wochen 13 Stunden her von vikrantLumiq. Begründung: Adding additional information

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
4 Wochen 13 Stunden her - 4 Wochen 13 Stunden her #186870 von DenisChenu

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .
Letzte Änderung: 4 Wochen 13 Stunden her von DenisChenu.
Folgende Benutzer bedankten sich: vikrantLumiq

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
4 Wochen 13 Stunden her - 4 Wochen 13 Stunden her #186875 von vikrantLumiq
Okay. Is there a way to work without the plugin parameter in my current LimeSurvey version? And if not, can I use ComfortUpdate to update to version 4.0 without any issue to my current setup. As it is the only version >=3.2 listed in my ComfortUpdate list.

Thank you.
Letzte Änderung: 4 Wochen 13 Stunden her von vikrantLumiq.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
4 Wochen 13 Stunden her - 4 Wochen 13 Stunden her #186878 von DenisChenu
If there are a way : why did you think we add it ?

The only way : allow user to login via AuthDB and give him password …

Edit : else about version : if you have Comfort Update : open a limesurvey GMBH issue : www.limesurvey.org/customer-support/contact-us
You can still donwload the last stable version : www.limesurvey.org/stable-release

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .
Letzte Änderung: 4 Wochen 13 Stunden her von DenisChenu. Begründung: Edit
Folgende Benutzer bedankten sich: vikrantLumiq

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Wochen 6 Tage her #186894 von vikrantLumiq
Thank you Denis. It worked for me using the encoded password in MySQL DB via AuthDB login, which is fine for my use-case as of now.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha