Welcome, Guest
Username: Password: Remember me

TOPIC: i can't add_participant

i can't add_participant 2 years 2 months ago #98471

  • grisuno
  • grisuno's Avatar
Dear, I have a problem, do not know, if I am very stupid or what, but I can not use the functions invite_participant and add_participant, first describe the problem, I use the function add_participant and adding a participant but in blank, and invite_participants returns [status] => Error : No candidate tokens. Now show the sample code I am using.
require_once 'some_path_to/jsonRPCClient.php';
define( 'LS_BASEURL', 'http://some_url/system/survey/index.php');  // adjust this one to your actual LimeSurvey URL
define( 'LS_USER', 'admin' );
define( 'LS_PASSWORD', 'some_pass' );
// the survey to process
// instanciate a new client
$myJSONRPCClient = new jsonRPCClient( LS_BASEURL.'/admin/remotecontrol' );
// receive session key
$sessionKey= $myJSONRPCClient->get_session_key( LS_USER, LS_PASSWORD );
// receive all ids and info of groups belonging to a given survey
$addp = $myJSONRPCClient->add_participants(
$send = $myJSONRPCClient->invite_participants($sessionKey, $survey_id);
$myJSONRPCClient->release_session_key( $sessionKey );	
$myJSONRPCClient->release_session_key( $sessionKey );

and that return
=> [lastname] => [firstname] => ) Array ( [status] => Error: No candidate tokens ) [/quote] many thanks in advance[email] =>
[lastname] =>
[firstname] =>
[status] => Error: No candidate tokens

many thanks in advance
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.193 seconds