Welcome to the LimeSurvey Community Forum

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

[LimeSurvey LTS] Expose Remote Control 2 API before first login

  • p-gw123
  • p-gw123's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 4 months ago - 1 year 4 months ago #236248 by p-gw123
Your LimeSurvey version: LTS (3.28)

Hi, 

I am developing a wrapper package to call the Remote Control 2 API from Julia. 
I also want to automatically test the endpoints using CI. For this I set up a Docker container with a custom `config.php` that exposes the API endpoints:
Code:
    'config'=>array(
        // debug: Set this to 1 if you are looking for errors. If you still get no errors after enabling this
        // then please check your error-logs - either in your hosting provider admin panel or in some /logs directory
        // on your webspace.
        // LimeSurvey developers: Set this to 2 to additionally display STRICT PHP error messages and put MySQL in STRICT mode and get full access to standard themes
        'debug'=>0,
        'debugsql'=>0,
        // 'force_xmlsettings_for_survey_rendering' => true, // Uncomment if you want to force the use of the XML file rather than DB (for easy theme development)
        // 'use_asset_manager'=>true, // Uncomment if you want to use debug mode and asset manager at the same time
        // Update default LimeSurvey config here
        'RPCInterface'=>'json',
        'rpc_publish_api' => true,
        'maxLoginAttempt' => 10,
    )

When testing this on the latest LimeSurvey version it already works great, but on the LimeSurvey LTS release (3.28) the login request (`get_session_key`) fails with `Invalid user name or password` error.
Only once I try login from the web interface (`/admin`) the Remote Control 2 API also begins to work (even if the web login fails) and I can run the tests as usual.

Do you have any hints on what is happening here? Is there something I can do to make the API work on LTS even if I don't login in the web interface first? Obviously that is not an option when running the tests in the CI pipeline. 
Last edit: 1 year 4 months ago by p-gw123.

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 4 months ago #237791 by DenisChenu
Warning : settings in config.php like this are only used when install.

After : you must update it in DB
Maybe something here ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose