Welcome to the LimeSurvey Community Forum

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

RemoteControl_2_API#PHP_Example

  • darshanrdesai
  • darshanrdesai's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 3 months ago #219772 by darshanrdesai
RemoteControl_2_API#PHP_Example was created by darshanrdesai
Hello LimeSurvey Team,
I am trying to use the below API
www.limesurvey.org/manual/RemoteControl_2_API#PHP_Example
But I get the below error:
Fatal error: Uncaught Exception: Incorrect response id: (request id: 1) in C:\PATH\jsonrpcphp\JsonRPCClient.php:196 Stack trace: #0 C:\PATH\Test.php(43): org\jsonrpcphp\JsonRPCClient->__call('get_session_key', Array) #1 {main} thrown in C:\PATH\jsonrpcphp\JsonRPCClient.php on line 196

Warning
: Trying to access array offset on value of type null in C:\PATH\jsonrpcphp\JsonRPCClient.php on line 195
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 years 3 months ago #219780 by DenisChenu
Replied by DenisChenu on topic RemoteControl_2_API#PHP_Example
Bad url maybe

> $myJSONRPCClient = new \org\jsonrpcphp\JsonRPCClient( LS_BASEURL.'/admin/remotecontrol' );

This is false : copy/paste from LimeSurvey interface.

Else : broke with Incorrect response id means there are no JSONRPC answer at end. Can be a 200, a 404 a 500 etc …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
  • darshanrdesai
  • darshanrdesai's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 3 months ago #219783 by darshanrdesai
Replied by darshanrdesai on topic RemoteControl_2_API#PHP_Example
Hello DenisChenu,

Thank you. URL used is below :
https://<DOMAIN>.limesurvey.org/limesurvey/index.php?r=admin/remotecontrol

If this is wrong kindly could you mention the right one please.

Yes, This is the below error message:
404 Not Found
nginx
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 years 3 months ago #219784 by DenisChenu
Replied by DenisChenu on topic RemoteControl_2_API#PHP_Example
In the administration page : where you activate RPC : www.limesurvey.org/manual/Global_settings#Interfaces

You see the url to use.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The following user(s) said Thank You: darshanrdesai
The topic has been locked.
Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose