Limesurvey api connection

I’m trying to connect my bubble.is APP to my LimeSurvey installation.

I’ve been reading the bubble.is manual but I’m struggling with it.

The LimeSurvey API (LSRC2) makes it possible for developers to control specific functionality of LimeSurvey from any other application.
The basic LSRC2 URL is: http://<your_domain>/<your_limesurvey_dir>/index.php/admin/remotecontrol. LSRC2 fully complies with JSON-RPC version 1 specifications.

To connect to the LimeSurvey API, you have to get a session key, which is a parameter for all the subsequent calls to the API functions. For example:

get_session_key
/**
* Create and return a session key.
*
* Using this function you can create a new XML-RPC/JSON-RPC session key.
* This is mandatory for all following LSRC2 function calls.
*
* * In case of success : Return the session key in string
* * In case of error:
* * for protocol-level errors (invalid format etc), an error message.
* * For invalid username and password, returns a null error and the result body contains a ‘status’ name-value pair with the error message.
*
* access public
* param string $username
* param string $password
* return string|array
*/

Then you can call another function like list_users
list_users
/**
* Get list the ids and info of users.
*
* Returns array of ids and info.
*
* Failure status : No users found, Invalid session key, No permission (super admin is required)
*
* param string $sSessionKey Auth credentials
* param int $uid Optional parameter user id.
* return array The list of users in case of success
*/

So I configured the connector API and managed to get the session KEY, the problem is that I don’t know how to use the obtained Key to call subsequent functions.


The question is how do I include the session key in all subsequent calls. I tried using OAuth2 custom token but I get errors and the help available in the manual is too short (1 paragraph).

PLEASE HELP!

1 Like

Anyone?
:anguished:

I guess no one can help. I was very impressed with bubble.is and thought it was a very good tool for what I was intending to do. It is a pity I’m gonna have to search for another app.

:disappointed:

If you’re looking for specific help, it might best to book @copilot or @romanmg for a 1-1 session to help with this.

Here’s an API call that gets a session key from another API call, you can call it this way and extract the session key as long as that call’s “Use as” is set to “Data”.

Telit%20Usage

If the call’s “Use as” is set to “Action”, you can refer to its response with “Result of step _______'s sessionId”

Telit%20Usage%202