Adding Participants using API

Mehr
3 Monate 1 Woche her #179389 von premosystems
COM_KUNENA_MESSAGE_CREATED_NEW
I am trying to add participants using the API but get a response of {"id":1,"result":{"status":"No permission"},"error":null}

I have successfully created a session key and retrieved the list of surveys. I am accessing the call using the owner of the survey who is also an admin with full access.

My JSON call is:

{"method": "add_participants","params": ["SessionKey",123456,[{"firstname": "James","lastname": "Bond","email": "james@bond.com","attribute_1": "Male","attribute_2": "042"}],true ], "id": 1}

I have tried a wide variety of changes with no joy.

What am I doing wrong or is this part of the API broken?

I am having similar issues with some other calls. Some are adding records like this one and some are getting data like token responses.

Any assistance will be greatly appreciated.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

LimeSurvey Partners
Mehr
2 Monate 4 Wochen her #179751 von iosman
COM_KUNENA_MESSAGE_REPLIED_NEW
wow great information totally love it buddy.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
2 Monate 3 Wochen her - 2 Monate 3 Wochen her #179801 von iosman1
COM_KUNENA_MESSAGE_REPLIED_NEW
SPAM
Last edit: 2 Monate 3 Wochen her by DenisChenu.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
2 Monate 2 Wochen her #180059 von premosystems
COM_KUNENA_MESSAGE_REPLIED_NEW
OK, so I have managed to add participants using the API.

Format is

{
"method": "add_participants",
"params": {
"sSessionKey":"##############################",
"iSurveyID": 123,
"aParticipantData":
[
{
"firstname": "Stephen",
"lastname": "Jones",
"email": "Diese E-Mail-Adresse ist vor Spambots geschützt! Zur Anzeige muss JavaScript eingeschaltet sein!",
"emailstatus": "OK",
"language": "en",
"token":"MG0007",
"attribute_1": "XYZ"
}
]
},
"bCreateToken": "false",
"id": 1
}

But how do I do this and SET the token for the user. I want specific tokens that relate to other information.

When I use the following in aParticipantData nothing happens and a Token is set for the user irrespective of the bCreateToken setting:

"token":"MG0007"

If I can't set as part of add_participant, can I change using set_participant_properties ?

I get a "No valid Data" status if I use this JSON:

{
"method": "set_participant_properties",
"params": {
"sSessionKey":"##########################",
"iSurveyID": 123,
"iTokenId" : 8,
"aTokenData":
[
{
"token":"MG0007"
}
]
},
"id": 1
}

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha