Welcome to the LimeSurvey Community Forum

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

Can an external program add a survey participant and trigger an invitation send?

  • debrota
  • debrota's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #199361 by debrota
I would like a .PHP program (external to LimeSurvey) to add a new survey participant to the survey participant table, generate an access code for the new participant, and then trigger the sending of an invitation to the participant by LimeSurvey. Is this possible?
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #199363 by Joffm
Hi,
if there is a php program I'd recommend to do everything within this program.
1. Create the access code (you could use
"function generateRandomString($length,$cryptographicallyStrong=true)"
in "CSecurityManager.php")

2. Create your invitation mail and send out with something like "phpmailer".

3. Insert the participant into the participant table with the correct datetime of invitation.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #199373 by tpartner
Here is an example of how to add and invite a participant using the API in PHP.

- forums.limesurvey.org/forum/can-i-do-thi...rvey?start=15#171537

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #199379 by Joffm
I was blind, as usual
I didn't see the API function

Invite participants in a survey (RPC function)

invite_participants(string $sSessionKey,integer $iSurveyID,array $aTokenIds = null,boolean $bEmail = true): array

Returns array of results of sending


Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose