Hi there, I have a music game and currently I’m using Monstercat’s audio in my game. The issue is, is that I’m trying to make it so that I can get all of the audios under the player and insert it into a table. When I try to use the API for getting assets of a user, I get the error HttpError: InvalidRedirect
.
Attempt:
local httpsservice = game:GetService("HttpService")
local url = "https://roproxy.com/users/inventory/list-json?assetTypeId=11&cursor=&itemsPerPage=100&pageNumber=%25x&sortOrder=Desc&userId=" -- the url I kept in tutorial
-- also make sure you remove the userid which is in the link if any
local assetid = {3} -- t shirt assets,shirts and pants
local id = 1750384777
local linkforplayer = url..id -- we add the userid to the link
local datafromlink = httpsservice:GetAsync(linkforplayer,true) -- second argument is cache, I kept it true because its needed for this system
-- the data we get from the link is in JSON format so we have to decode it to lua
local readabledata = httpsservice:JSONDecode(datafromlink)
print(readabledata)