Get All Enrolled Users
This endpoint allows you to list all users enrolled in a specific group quest. The response is paginated using limit/offset pagination. To see more details about pagination, refer to the Pagination documentation.
To check if a particular user is enrolled, consider using the Get Enrolled User endpoint.
API Endpointβ
GET /group-quests/{questId}/enrolled-users
Headersβ
Include your API_KEY in the request header for authentication. The required header format is:
API_KEY: your-api-key-here
Query Parametersβ
| Parameter | Description | Required |
|---|---|---|
offset | The number of items to skip before starting to collect the result set | No |
limit | The maximum number of items to return | No |
Path Parametersβ
| Parameter | Description |
|---|---|
questId | The unique ID of the quest in YGG's system. |
Example Requestβ
Hereβs an example using curl to fetch the users enrolled in a group quest:
curl -X GET "https://api.example.com/group-quests/quest123/enrolled-users" \
-H "API_KEY: your-api-key-here"
This request will fetch the first 100 users enrolled in the quest with questId set to "quest123".
Responsesβ
Success Response (200)β
If the request is successful, you will receive a 200 response with the following body:
{
"success": true,
"data": [
{
"yggUserId": "unique-user-id-1",
"email": "user-1@example.com"
},
{
"yggUserId": "unique-user-id-2",
"email": "user-2@example.com"
}
],
"pagination": {
"limit": 250,
"offset": 0,
"nextPage": null,
"previousPage": null
}
}
Error Response (400)β
If the request contains an error, such as an invalid questId or missing authentication, you will receive a 400 response with the following body:
{
"success": false,
"message": "Description of the error"
}