How to get all a players inventory?

Hello I’m trying to get the inventory by UserId of any player.

I’m not very good at http requests so PLEASE do not just tell me how to use a bot or app to run the code because I am aware that’s a way to do it

I already have some things that I’m pretty sure is the method of getting the players followers

I got this from another post: (IDK what to do with it)

https://www.roblox.com/users/favorites/list-json?assetTypeId=9&itemsPerPage=100&pageNumber=1&userId=261

The api: (IDK what to do with it)

GET /v1/users/{userId}/categories/favorites

The api:
Inventory Api)

that stuff exists, I just need help getting the code to run the stuff

Some assistance is that i have used this code twice in order to get info on a player however it’s not working for this:

local HttpService = game:GetService("HttpService");
local remote = game.ReplicatedStorage.Favorites
remote.OnServerInvoke = function(plr, UserId)
	local followers = {};
	local url = ("LINK HERE"):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
2 Likes

you can’t access roblox APIs from in a roblox game
you’ll need to make an http request to a 3rd party to make the request to roblox for this script

How would i do it in a script? do i have to make a bot do it? is there already a bot that does it so i dont have to?

idk the apis for it, but people have made some to do this for you

how do i get the apis?I don’t know how

try looking through devforum posts for any publicly released ones

I found this
https://inventory.roblox.com/docs#/
but I dont know how to use it

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)
image
image

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

1 Like

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

AFAIK that’s not how assetType works look at this you should put the name of your getting.