Last updated
GET
GetBadgeChallengesThe GetBadgeChallenges
API endpoint Retrieves a list of challenges with badge rewards for a specific user, including information about each challenge's status, rewards, and whether it has been achieved or locked.
Once the badge is achieved in the SDK, its image turned into colored.
Use Cases Examples:
Retrieving Badge Challenges for a User:
This API fetches a list of badge challenges available to a specific user, including details on whether they have been achieved or are still locked.
Display Challenges in User Profile:
The response can be used to display the user's progress in challenges, showing which badges have been earned and which ones are still pending.
Challenge Filtering:
The API filters challenges based on visibility rules, ensuring that only relevant challenges are returned based on the user's progress and configuration settings.
X-ClientId
Provided Client Id.
X-Message
Provided encrypted message.
Accept-language
Selected language for response.
X-ClientId and X-Message are only required with V1 API.
UserId
The phone number of the user for whom the badge challenges are being retrieved.
Returns a list of challenges object if successful. Otherwise, return status Code message error.
Response Fields:
data
(List): A list of challenges.
pagesNum
(int): The current page number.
count
(int): The total number of challenges matching the criteria.
Name
The name of the challenge.
Id
The unique identifier for the challenge.
IsLocked
Indicates whether the challenge is locked.
IsAchieved
Indicates whether the user has achieved this challenge.
Image
The URL for the badge's image.
Rewards*
A list of rewards associated with the challenge.
Rewards (List): A list of rewards associated with the challenge.
Id
The unique identifier for the reward.
Name
The name of the reward.
RewardType*
The type of reward (e.g., Badge = 3
).