In my game, I use RoProxy to access the ROBLOX users API (https://users.roproxy.com/v1/users/[id]) to retrieve player information. However, in some cases, players encounter rate limits because the game needs to make multiple API calls in a short time.
How do games like Player RNG manage to call the ROBLOX users API without getting rate-limited? I assume that Player RNG uses the users API to check if a player has the verified badge and similar details.
type user = {hasVerifiedBadge: boolean, id: number, name: string, displayName: string}
--this function accepts a total of 200 ids per request
--if you have more, you will need to split them to 200 id parts
local function getIdsData(ids: {number}): {user}
--proxy this
local url = "https://users.roblox.com/v1/users"
local payload = game.HttpService:JSONEncode({userIds = ids, excludeBannedUsers = false})
--pcall this
local response = game.HttpService:PostAsync(url, payload, Enum.HttpContentType.ApplicationJson)
local data = game.HttpService:JSONDecode(response)
return data.data
end
They may be using other methods as well such as duplicate removal, caching, parallelization, etc