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

More
1 month 2 weeks 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?

Please Log in to join the conversation.

LimeSurvey Partners
More
1 month 2 weeks 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

Please Log in to join the conversation.

More
1 month 2 weeks 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.
Official LimeSurvey Partner - partnersurveys.com

Please Log in to join the conversation.

More
1 month 2 weeks 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

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now