Well, that’s probably the first thing you need to start on. Remember that you won’t be able to fetch a user’s collectibles inventory if they’re hidden - something to account for depending on your use case.
The first thing you need to do is send a GET request to the endpoint. Use rprxy, since you can’t directly send requests to Roblox. You must also ensure that Http requests are enabled, either by using the Game Settings tab or setting HttpEnabled to true via the command bar.
local HttpService = game:GetService("HttpService")
local UserId = 1
local Endpoint = "https://inventory.rprxy.xyz/v1/users/%d/assets/collectibles"
local success, result = pcall(HttpService.GetAsync, HttpService, Endpoint:format(UserId))
Once you’ve done this, you can work with the data that’s retrieved. The data returned is in JSON format, so you will need to use JSON decode. Then, simply iterate through the table. This is assuming that the call is successful and returns data.
for key, value in pairs(result) do
If success is false, then the call most likely failed for some reason - such as the endpoint being down or the user’s inventory being hidden. If that’s so, you can check if success is false and print out the error that was received, then handle the rest (e.g. by changing a RAP label to “hidden”).
if not success then