- Posts: 3
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
get_session_key API call returns "Invalid user name or password"
- alefebvr
- Topic Author
- Offline
- New Member
Less
More
4 years 11 months ago - 4 years 11 months ago #184442
by alefebvr
get_session_key API call returns "Invalid user name or password" was created by 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.
Both return:
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
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.
Code:
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
Code:
{ "error": null, "id": 1, "result": { "status": "Invalid user name or 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: 4 years 11 months ago by alefebvr.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
4 years 11 months ago #184476
by 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 , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic get_session_key API call returns "Invalid user name or password"
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');
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 , plugin development .
I don't answer to private message.
The topic has been locked.
- alefebvr
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
4 years 11 months ago #184483
by alefebvr
Replied by alefebvr on topic get_session_key API call returns "Invalid user name or password"
Thanks Denis, worked first time round!!
The topic has been locked.
- alefebvr
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
4 years 11 months ago #184484
by alefebvr
Replied by alefebvr on topic get_session_key API call returns "Invalid user name or password"
PS: Note that I couldn't find the documentation about this "AuthLDAP" parameter, should I open an issue for this?
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
4 years 11 months ago - 4 years 11 months ago #184565
by DenisChenu
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 , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic get_session_key API call returns "Invalid user name or password"
Yes please, and put the link here …alefebvr wrote: PS: Note that I couldn't find the documentation about this "AuthLDAP" parameter, should I open an issue for this?
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 , plugin development .
I don't answer to private message.
Last edit: 4 years 11 months ago by DenisChenu.
The topic has been locked.
- vikrantLumiq
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
4 years 8 months ago - 4 years 8 months ago #186869
by vikrantLumiq
Replied by vikrantLumiq on topic get_session_key API call returns "Invalid user name or password"
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
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
Last edit: 4 years 8 months ago by vikrantLumiq. Reason: Adding additional information
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
4 years 8 months ago - 4 years 8 months ago #186870
by 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 , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic get_session_key API call returns "Invalid user name or password"
github.com/LimeSurvey/LimeSurvey/commit/...594cf9ef157799417f85
Only in 3.2 and up version.
See doc : github.com/LimeSurvey/LimeSurvey/blob/71...ease_notes.txt#L1817
And manual : manual.limesurvey.org/RemoteControl_2_API#Sessions
Only in 3.2 and up version.
See doc : github.com/LimeSurvey/LimeSurvey/blob/71...ease_notes.txt#L1817
And manual : manual.limesurvey.org/RemoteControl_2_API#Sessions
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.
Last edit: 4 years 8 months ago by DenisChenu.
The following user(s) said Thank You: vikrantLumiq
The topic has been locked.
- vikrantLumiq
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
4 years 8 months ago - 4 years 8 months ago #186875
by vikrantLumiq
Replied by vikrantLumiq on topic get_session_key API call returns "Invalid user name or password"
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 >.2 listed in my ComfortUpdate list.
Thank you.
Thank you.
Last edit: 4 years 8 months ago by vikrantLumiq.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
4 years 8 months ago - 4 years 8 months ago #186878
by 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 , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic get_session_key API call returns "Invalid user name or password"
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
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 , plugin development .
I don't answer to private message.
Last edit: 4 years 8 months ago by DenisChenu. Reason: Edit
The following user(s) said Thank You: vikrantLumiq
The topic has been locked.
- vikrantLumiq
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
4 years 8 months ago #186894
by vikrantLumiq
Replied by vikrantLumiq on topic get_session_key API call returns "Invalid user name or password"
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.
The topic has been locked.