I want to get a list of a players Assets (Models) with the roblox api, does anyone know how?
you can do insertservice:GetUserSets(userid)
-- server script in serverscript service
local Service = game:GetService("InsertService")
local PlrAssets = Service:GetUserSets(1) -- change to user id
if PlrAssets then
for i, Asset in pairs(PlrAssets) do
print(Asset)
end
end
make sure to go into the output and turn off log mode by going to the top corner witht he 3 dots
and turn off log mode
2 Likes
I am trying to do this with a python script.
1 Like
ah my bad. you should’ve specified it then.
2 Likes
Sorry I did not, thanks anyways.
1 Like
Ok so I found fandom wiki with a list of official roblox web API list with docs, save this link somewhere as it’s useful
This is probably what you are looking for. Example response using my id:
{
"assetIds": [
86498048,
86500008,
86500036,
86500054,
86500064,
86500078,
144075659,
144076358,
144076760,
4599382735,
790965994
]
}
1 Like
Here’s the API endpoint for getting a user’s inventory:
https://inventory.roblox.com/docs#!/Inventory/get_v2_users_userId_inventory
and here’s a sample request which specifically gets models only:
https://inventory.roblox.com/v2/users/261/inventory?assetTypes=Model&limit=100&sortOrder=Asc
2 Likes
