Welcome, Guest
Username: Password: Remember me

TOPIC: Adding tokens programmatically

Adding tokens programmatically 3 years 6 months ago #59757

  • jonoF
  • jonoF's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
I'm working on an existing application that manages and tracks support issues for our clients. I'm looking to ask users to complete a survey after their issue is resolved.

The LimeSurvey token option looks like the kind of feature I need - users can only complete the survey once, and only on invitation. However, is it possible to add tokens automatically, i.e. via a call from the existing application? Manually adding user tokens after each issue is not really practical for the volumes we deal with.
The administrator has disabled public write access.

Re: Adding tokens programmatically 3 years 6 months ago #59809

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6435
  • Thank you received: 840
  • Karma: 249
You can create token on the fly with an external PHP script, this script redirect after to the good survey with the good token (and information from your system).

Some php dev but not so hard.
The administrator has disabled public write access.
The following user(s) said Thank You: tcb

Re: Adding tokens programmatically 3 years 2 months ago #64741

  • tcb
  • tcb's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
This is useful to know but can you tell us a bit more?

Is there any documentation on this?

Can you give us a snippet of PHP that would programatically add a new user to a minimal token table?

Thanks
The administrator has disabled public write access.

Re: Adding tokens programmatically 3 years 1 month ago #65282

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6435
  • Thank you received: 840
  • Karma: 249
Hello,

Maybe you can have a look to remote control source code :).
docs.limesurvey.org/RemoteControl

I'm not sure it actually work, but you find some interestiong code.

But :
1st : your tracker create a line in the LS token base ( sql insert).
2nd : you redirect the user to the link with the token.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.117 seconds
Donation Image