Welcome to the LimeSurvey Community Forum

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

Creating New User from API in LimeSurvey

  • darliv
  • darliv's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 months 3 weeks ago - 2 months 3 weeks ago #255155 by darliv
Your LimeSurvey version:  LimeSurvey Community Edition   Version 6.1.6+230703
==================
Hello everyone, 
I want to make a system that saves points for every survey that is submited.
The system will include a login or register into the web application and i want to get the login or register(which creates users) from LimeSurvey API if it exists.
For each user i  will list his surveys to fill and then submit.
So i made some tries with this endpoint : https://my-domain/index.php/userManagement/applyedit
According to me in there you can create the user. but needed some information in PAYLOAD. They are : 
  1. YII_CSRF_TOKEN: the token
  2. User[uid]:
  3. User[users_name]: some name
  4. User[full_name]: some name
  5. User
  6. expires:
  7. preset_password: 1
  8. User[password]: password 
  9. password_repeat: password
  10. random_example_password:random password
  11. YII_CSRF_TOKEN: the token

    Now what i want to do is to get the token but i dont know how to get it because on Remote Control API it doesnt seem to have a method to do it.
    This is what i want to do.

    Thank you very much.
Last edit: 2 months 3 weeks ago by darliv.

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 months 3 weeks ago - 2 months 3 weeks ago #255188 by DenisChenu
Replied by DenisChenu on topic Creating New User from API in LimeSurvey
?
You don't use API here, you just try to use controller on a bad way.  If we allow such action easily: it's a security issue.

The API : manual.limesurvey.org/RemoteControl_2_API
Since there are no limesurvey admin management : you can create your own function : gitlab.com/SondagesPro/RemoteControl/extendRemoteControl


(moved to development)
 

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: 2 months 3 weeks ago by DenisChenu.

Please Log in to join the conversation.

  • darliv
  • darliv's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 months 3 weeks ago - 2 months 3 weeks ago #255203 by darliv
Replied by darliv on topic Creating New User from API in LimeSurvey
So there is no clean way to register or even login a user with API Remote Control?

Thanks
Last edit: 2 months 3 weeks ago by darliv.

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 months 3 weeks ago #255213 by DenisChenu
Replied by DenisChenu on topic Creating New User from API in LimeSurvey
login : you need to login to use Remote Control API : manual.limesurvey.org/RemoteControl_2_API#get_session_key

Clean way : i give you a clean way (use such plugin since years now).

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 following user(s) said Thank You: darliv

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose