I am trying to get a player’s saved outfits. I’ve seen from previous/other DevForum posts that you can use the userId’s Outfits API, I just don’t know how it’s used. I do not have to be baby-fed with a script, I just want a short example or a source.
Here’s a simple example I made which requests for the api url, but wouldn’t work because roblox doesn’t allow requests from their website.
local HttpService = game:GetService('HttpService')
local url = 'https://avatar.roblox.com/v1/users/userid/outfits'
local request = HttpService:GetAsync(url)
local decoded = HttpService:JSONDecode(request)
if not decoded.data then
return warn('Unable to get outfits.')
end
You use /v1/users/{userId}/outfits to get all the outfit ids for the user’s outfits and then you can use /v1/outfits/{userOutfitId}/details to get all the equipped items, body colors, avatar scale, etc. from that particular outfit id