Welcome to the LimeSurvey Community Forum

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

LimeSurvey 4.3.22 API access code problem

  • stephenh
  • stephenh's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 5 months ago #206971 by stephenh
When using the LimeSurvey UI to add a survey participant and then selecting 'Generate access codes' I get a 15 character code as you expect. However, when using the remote control API I instead get a two character code always followed by an equals sign. This is what then appears in the UI for the access code too. Is this a bug or is there something I'm missing?

Example of what I'm sending:

{"method":"add_participants","params":["ZZZZZZZ",999999,
[{"email":"stephen@example.com","lastname":"H","firstname":"Stephen"}]],"id":1}

And what I'm getting back:

{"id":1,"result":[{"sent":"N","remindersent":"N","remindercount":0,"completed":"N","usesleft":1,"emailstatus":"OK",
"email":"stephen@example.com","lastname":"H","firstname":"Stephen","token":"Uw=","tid":"15",
"participant_id":null,"language":null,"blacklisted":null,"validfrom":null,"validuntil":null,"mpid":null}],"error":null}
The topic has been locked.
More
3 years 5 months ago #207121 by deepam
Replied by deepam on topic LimeSurvey 4.3.22 API access code problem
Hi, I have the same issue, someone know why that happens?

Thank you!
The topic has been locked.
More
3 years 5 months ago #207125 by deepam
Replied by deepam on topic LimeSurvey 4.3.22 API access code problem
There is a function called public function generateToken($tokenlength = null) in models/Token.php
you can update the tokenlength=15, this will generate 15 character code.
The topic has been locked.
  • stephenh
  • stephenh's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 5 months ago #207876 by stephenh
Replied by stephenh on topic LimeSurvey 4.3.22 API access code problem
For anyone else having problems it's this bug: bugs.limesurvey.org/view.php?id=16042 .
The following user(s) said Thank You: DenisChenu, cdorin
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose