get_session_key API call returns "Invalid user name or password"

Mehr
1 Woche 3 Tage her - 1 Woche 3 Tage her #184442 von alefebvr
COM_KUNENA_MESSAGE_CREATED_NEW
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
Last edit: 1 Woche 3 Tage her by alefebvr.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

LimeSurvey Partners
Mehr
1 Woche 2 Tage her #184476 von DenisChenu
COM_KUNENA_MESSAGE_REPLIED_NEW
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 an der Konversation teilzunehmen.

Mehr
1 Woche 2 Tage her #184483 von alefebvr
COM_KUNENA_MESSAGE_REPLIED_NEW
Thanks Denis, worked first time round!!

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Woche 2 Tage her #184484 von alefebvr
COM_KUNENA_MESSAGE_REPLIED_NEW
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 an der Konversation teilzunehmen.

Mehr
1 Woche 1 Tag her - 1 Woche 1 Tag her #184565 von DenisChenu
COM_KUNENA_MESSAGE_REPLIED_NEW

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 .
Last edit: 1 Woche 1 Tag her by DenisChenu.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

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