➕Creating Participants
This step shows the method to add one or more users as participants in a session with Groups API.
Important Note! Constructor Groups’ V1 API has been retired and is no longer available to new customers. Please use the Groups V2 API going forward. Link to V2 API documentation: https://developer.perculus.com/v2-en
Using Groups API, there are two ways to create participants for a session:
Adding a user to the session
Before you can add a user as a participant in a session, you will need the USER_ID data of that user and the SESSION_ID data of that specific session.
Available parameters:
user_id
string
Yes
n/a
GUID of the user that will be added to the session as a participant
Example Payload:
curl --location --request POST \
'https://<DOMAIN>/xapi/session/<SESSION_ID>/attendees' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '[{
"user_id": "<USER_ID>",
"role": "u"
}]'
Example Response:
{
"approved": [
{
"session_id": "<SESSION_ID>",
"user_id": "<USER_ID>",
"attendee_id": "***",
"attendance_code": "<ATTENDANCE_CODE>",
"name": "john",
"surname": "Doe",
"email": "[email protected]",
"role": "u",
"mobile": "",
"avatar": null,
"creation_date": "2024-08-16T01:55:15.7991084Z",
"updating_date": null
}
],
"rejected": []
}
You will need to work with the 'ATTENDANCE_CODE' data in the example response you see above if you are making an edit to the settings of a participant in that session. You must therefore store this data securely.
To obtain the attendance link for participants to join the session, please see the relevant section.
🔴 You will see two objects as approved and rejected in the response, you can see their details below:
approved:
Lists the records successfully added from the users.
rejected:
Lists the records that cannot be added from users.
Example Response:
{
"approved": [],
"rejected": [
{
"model": null,
"state": {
"code": 10,
"details": "Object reference not set to an instance of an object."
}
}
]
}
Last updated
Was this helpful?