Hello, sorry if the title is a bit confusing. I dev a game where it gives a badge for everyone that joins, and it helps keep track of the total unique people who have joined, but I wondered if there was a way to see the 1000th person who got it, or 200th, or any position? If not, is there a way to see the 200th visitor instead? It is too late to add a datastore system, so I just wondered if this was possible.
After a bit of digging, yes, this is kinda possible!
You’ll need to send a HttpService:GetAsync() or a HttpService:RequestAsync() (with the method set to “GET”) to the actual web api for badges.
Here’s the endpoint:
https://badges.roblox.com/v1/badges/BADGE_ID_GOES_HERE
It’s a public endpoint with no authentication required, returns a dictionary with the data of the badge, including a key… awardedCount
! Now while this doesn’t provide the exact position which I don’t think is publicly available anymore (since public sales and purchases on assets have been privated), you could store how many awards have been given and then notify yourself whenever a milestone number has been hit and the associated player.
You can however get the exact date and time it was awarded to a player using this endpoint:
https://badges.roblox.com/v1/users/USER_ID/badges/awarded-dates?badgeIds=BADGE_ID
which will return an ISO 8601 DateTime object under the key awardedDate
.
The best solution would be now in the future to keep track of the awardedCount
of a bdage from the moment of allowing it to be given to players. Hope this helps!
Thanks! I will look into this!