how do i get the apis?I don’t know how
try looking through devforum posts for any publicly released ones
that’s a roblox api, you need an external api made by either yourself, or someone, to do the http request to roblox, then send the data to your game
Can you please help me find one? I can’t really find anything but you said there was stuff available
sorry, no, I’m not going to look for one for you
Hello, i found a non roblox API (https://www.roproxy.com/users/inventory/
)
how would i include it in a script?
I tried doing this:
local HttpService = game:GetService("HttpService");
local remote = game.ReplicatedStorage.Inventory
remote.OnServerInvoke = function(plr, UserId)
local followers = {};
local url = ("https://www.roproxy.com/users/inventory/"):format(tostring(UserId))
local success, output = pcall(function() return HttpService:JSONDecode(HttpService:GetAsync(url)) end);
if not (success) then
print("Error fetching fat stacks of info")
return followers;
end
for _, v in pairs(output.data) do
table.insert(followers, {
name = v.name;
displayName = v.displayName;
userId = v.id;
});
end
return followers;
end
however it didnt work
looking at the endpoint’s docs, assetTypes is a required parameter for the url that you’re missing
idk any assetTypes to try though
I think i found something
But where do i include the asset type in the url?
like this:
"https://www.roproxy.com/users/inventory/2"
(the assettype Classic T-shirt is 2)
EDIT: I TESTED IT & IT DIDN’T WORK
that’s asset type id
you need asset type and you’re missing user id in this case
So basically what I’m doing for the userId is I’m doing
local url = (“https://www.roproxy.com/users/inventory/2”):format(tostring(UserId))
I’ll try with the asset type name
so rn im doing:
local url = ("https://www.roproxy.com/users/inventory/Classic T-shirt"):format(tostring(UserId))
edit: Still doesn’t work…
that string.format isnt adding the userid
you can use the api doc to test the request outside of roblox
also, I misread earlier thinking you were using the endpoint where you get a user’s inventory
U cant call roblox APIs, u need a external web page that when receive a remote it sends the requested inventory back, i dont know how to do that, but its the unique way
(If I have a good memory, I think there were people sending too many requests and there was a problem so it was banned, or maybe I’m confusing this with another related problem)
I found a Tutorial to do that
Hey can you send me the code. I appreciate not spoon feeding but I think I’m fine with understanding how it works now. It’s just the tedious trial and error state is useless since it seems like you already know how it works.
the link:
https://www.roproxy.com/users/inventory/
the assettype: 2 or Classic T-shirt
I haven’t been able to find the code on my own… sorry
local url = ("https://inventory.roproxy.com/v2/users/%s/inventory?assetTypes=TShirt&limit=100&sortOrder=Asc"):format(tostring(UserId)) -- The TShirt is the AssetType
local url = (“https://www.roproxy.com/users/inventory/TShirt”):format(tostring(UserId))
does not work. Do you mind sending the entire url and i will figure it out based off that?
Hey i just followed your tutorial and I think it’s outdated…
when i run it just gives me the error: HTTP 401 (Unauthorized) …
thank you this worked omg wow
<3 thank you so much this saved my life bro i started getting stressed
AND TO PEOPLE WHO ARE LOOKING AT THIS TUTORIAL IN ORDER TO GET HELP MY CODE IS:
local HttpService = game:GetService("HttpService");
local remote = game.ReplicatedStorage.Inventory
remote.OnServerInvoke = function(plr, UserId)
local followers = {};
local url = ("https://inventory.roproxy.com/v2/users/%s/inventory?assetTypes=TShirt&limit=100&sortOrder=Asc"):format(tostring(UserId))
local success, output = pcall(function() return HttpService:JSONDecode(HttpService:GetAsync(url)) end);
if not (success) then
print("Error fetching fat stacks of info")
return followers;
end
for _, v in pairs(output.data) do
table.insert(followers, {
name = v.name;
displayName = v.displayName;
userId = v.id;
});
end
return followers;
end
THIS RETURNS A TABLE OF WHATEVER ASSETTYPE YOU PUT IN:
PUT THE ASSET TYPE IN THE URL
"https://inventory.roproxy.com/v2/users/%s/inventory?assetTypes=(((ASSET-TYPE-HERE)))&limit=100&sortOrder=Asc"
example:
"https://inventory.roproxy.com/v2/users/%s/inventory?assetTypes=TShirt&limit=100&sortOrder=Asc"
THIS GIVES YOU ALL A PLAYERS T-SHIRTS
HERE IS A LIST OF ALL THE ASSET TYPES:
https://developer.roblox.com/en-us/api-reference/enum/AssetType