Welcome to the LimeSurvey Community Forum

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

How to get participant attribute values throught api?

  • muthukrishnanr
  • muthukrishnanr's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 6 months ago #141368 by muthukrishnanr
Hi,

I am trying to get the participant attribute values through api.

I have created session key, but i am getting empty page when i use below api.

require_once '../application/libraries/jsonRPCClient.php';
define( 'LS_BASEURL', 'http://xxxxx/limesurvey/index.php/'); // adjust this one to your actual LimeSurvey URL
define( 'LS_USER', 'admin' );
define( 'LS_PASSWORD', 'here i used my original password' );


$myJSONRPCClient = new JsonRPCClient(LS_BASEURL.'admin/remotecontrol');
$sessionKey= $myJSONRPCClient->get_session_key( LS_USER, LS_PASSWORD );
$groups = $myJSONRPCClient->getAttributesValues($attribute_id);

Help me on this.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose