Gamification
List Badge Leaderboard Groups
Returns one group for every badge configured by the authenticated creator, ordered by badge ID. Each group contains up to 5 eligible performers ranked by lifetime points. Use List General Points Leaderboard Entries for one paginated ranking across all eligible subscribers.
Eligible performers have an active or manually active, unexpired subscription to a Mango enabled for gamification on the authenticated host. Badges without eligible performers return an empty performers array.
This read-only operation accepts no path, query, or body fields and is safe to retry.
Authorization
bearer AuthorizationBearer <token>
In: header
Header Parameters
x-whitelabel-host*string
Host name of the dashboard, ex: mydomain.tagmango.com
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://api-prod-new.tagmango.com/api/v1/external/gamification/leaderboards/badges" \ -H "x-whitelabel-host: string"{
"code": 200,
"result": [
{
"badge": {
"_id": "6659ca9e5f2acb7abfdcd8fd",
"name": "Hall Of Fame",
"imageUrl": "https://testing.tagmango.com/assets/badge-icon-922e7f499bc0045d7af8ac771eebe2fe.png"
},
"performers": [
{
"rank": 1,
"points": 100,
"user": {
"name": "John Doe",
"profilePicUrl": "https://linktoprofilepic.com/pic.jpg",
"_id": "6659ca9e5f2acb7abfdcd8fd"
}
}
]
}
],
"type": "Success",
"message": "Badge leaderboard groups fetched successfully",
"statusMessage": "OK",
"success": true
}{
"code": 400,
"type": "Bad Request",
"statusMessage": "BAD_REQUEST",
"success": false,
"message": "Invalid request",
"result": "Invalid request"
}{
"code": 401,
"type": "Unauthorized",
"statusMessage": "UNAUTHORIZED",
"message": "Invalid token",
"result": "Invalid token",
"success": false
}{
"code": 403,
"type": "Forbidden",
"statusMessage": "FORBIDDEN",
"errorCode": "WORKSHOP_MANGO_FORBIDDEN",
"message": "You can not access this api with a TagMango account, only available for whitelabel hosts",
"result": "You can not access this api with a TagMango account, only available for whitelabel hosts",
"success": false
}{
"code": 429,
"type": "Too Many Requests",
"statusMessage": "TOO_MANY_REQUESTS",
"message": "Request limit exceeded. try after 10 seconds",
"result": "Request limit exceeded. try after 10 seconds",
"success": false
}{
"code": 500,
"type": "UnknownError",
"statusMessage": "INTERNAL_SERVER_ERROR",
"errorCode": "LEADERBOARD_LIST_FAILED",
"message": "We could not load the badge leaderboard groups. Please try again later.",
"result": "We could not load the badge leaderboard groups. Please try again later.",
"success": false
}