Welcome to the LimeSurvey Community Forum

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

export_responses_by_token: Unknown named parameter $sToken

  • przemyslaw.uzdowski.itcard
  • przemyslaw.uzdowski.itcard's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 months 4 weeks ago - 9 months 4 weeks ago #254404 by przemyslaw.uzdowski.itcard
export_responses_by_token: Unknown named parameter $sToken was created by przemyslaw.uzdowski.itcard
Please help us help you and fill where relevant:
Your LimeSurvey version: LimeSurvey Cloud   Version 6.4.0
==================
Hello,

with POST method to remotecontrol URI I am trying to get reponses by token via Postman.
I receive error 500 with title "Unknown named parameter $sToken".

Documentation states that this parameter exists:
export_responses_by_token(string $sSessionKey,integer $iSurveyID,string $sDocumentType,string $sToken,string $sLanguageCode = null,string $sCompletionStatus = 'all',string $sHeadingType = 'code',string $sResponseType = 'short',array $aFields = null): array|string

   
Code:
{
    "method": "export_responses_by_token",
    "params": {
        "sSessionKey": "{{session_key}}",
        "iSurveyID": 233154,
        "sDocumentType": "csv",
        "sToken": "{{participant_access_code}}"
    },
    "id": 1
}
 
What am I doing wrong?
Last edit: 9 months 4 weeks ago by przemyslaw.uzdowski.itcard.

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 months 4 weeks ago #254428 by tpartner
What does {{participant_access_code}} return?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

  • przemyslaw.uzdowski.itcard
  • przemyslaw.uzdowski.itcard's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 months 3 weeks ago - 9 months 3 weeks ago #254472 by przemyslaw.uzdowski.itcard
Replied by przemyslaw.uzdowski.itcard on topic export_responses_by_token: Unknown named parameter $sToken
It is a variable that returns "token" that is created with "add_participants" method ("aParticipantData" parameter).
Access code/token can also be set by adding a new Survey Participant in GUI and filling "Access code".

$sToken stands for something else than Survey Participant Acces Code?
Last edit: 9 months 3 weeks ago by przemyslaw.uzdowski.itcard.

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 months 3 weeks ago #254527 by tpartner
No, I was just asking whether it actually returns the token. Have you tested that?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

  • przemyslaw.uzdowski.itcard
  • przemyslaw.uzdowski.itcard's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 months 3 weeks ago #254578 by przemyslaw.uzdowski.itcard
Replied by przemyslaw.uzdowski.itcard on topic export_responses_by_token: Unknown named parameter $sToken
I am not entirely sure what you mean by ‘it returning the token’.
As I understand it, in ‘params’ I should include the token (access code) of a participant who took part in the survey.
The only thing that the method returns is quite a long code that includes a message:
Code:
<div class="col">
                <h2 class="error-title">
                    500: Internal Server Error
                    Unknown named parameter $sToken
                </h2>
                <div class="error-content">An internal error occurred while the Web server was processing your request.
                </div>
                Please contact Your Name to report this problem.
            </div>

So I guess I have not tested it. What should I do?

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 months 3 weeks ago #254593 by tpartner
I have no clue how you derive {{participant_access_code}} . To test, try hard-coding a valid token value for the sToken parameter.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

  • przemyslaw.uzdowski.itcard
  • przemyslaw.uzdowski.itcard's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 months 3 weeks ago #254594 by przemyslaw.uzdowski.itcard
Replied by przemyslaw.uzdowski.itcard on topic export_responses_by_token: Unknown named parameter $sToken
If sToken stands for an Access code of a Participant, I've already tried to hard-code it: same result. That is why I am seeking for help. 

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
9 months 3 weeks ago #254612 by DenisChenu
Can you try aTokens in place of sToken ?
github.com/LimeSurvey/LimeSurvey/blob/bb...hp#L3623C90-L3623C97

Or remove the keys maybe.
 

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: przemyslaw.uzdowski.itcard

Please Log in to join the conversation.

  • przemyslaw.uzdowski.itcard
  • przemyslaw.uzdowski.itcard's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 months 3 weeks ago #254659 by przemyslaw.uzdowski.itcard
Replied by przemyslaw.uzdowski.itcard on topic export_responses_by_token: Unknown named parameter $sToken

Can you try aTokens in place of sToken ?
 
It worked! I've received a result.
Now I need to find out what I can do with this result, but it's a different story.

Thank you! :) 

 

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
9 months 3 weeks ago #254661 by DenisChenu
OK,
Update name of parameters in remote control broke API semantical version …

Strange since we use json_rpc 1.0 www.jsonrpc.org/specification_v1

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.

Please Log in to join the conversation.

More
3 months 3 weeks ago #265922 by Amaury VAN ESPEN
Replied by Amaury VAN ESPEN on topic export_responses_by_token: Unknown named parameter $sToken
Hello,
recently updated with version 6.5.17
not more able to use the Postman Collection
could someone provide help ?
Thans
Amaury

Please Log in to join the conversation.

Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose