I want to be able to get the games a player has added to his profile.
I tried to use roproxy with this "https://inventory.roproxy.com/v2/users/%d/inventory/%d?sortOrder=Desc&limit=100&cursor=%s" link but it gives all of the places from inventory. It dosent work if the inventory is private. But games added to profile still show even if the inventory is private, and I only need those.
local function GetOwnedGames(UserId: number): {number}
local Ids = {}
local Cursor = ""
repeat
-- 9 means places
local Url = string.format(GAMES_PROXY, UserId, 9, Cursor)
local Success, Result = pcall(HttpService.GetAsync, HttpService, Url)
if Success then
local Data = HttpService:JSONDecode(Result)
if Data and Data.data then
for _, Item in Data.data do
if Item.assetId then
table.insert(Ids, Item.assetId)
end
end
Cursor = Data.nextPageCursor or ""
else
Cursor = ""
end
else
if string.find(Result, "403") then
warn("The player with the user id: " .. UserId .. " has a private inventory!")
return Ids
end
warn("Failed to get inventory: " .. tostring(Result))
Cursor = ""
end
until Cursor == ""
return Ids
end
Any other proxy I should use? Or maybe a way with Players or Marketplace service?
It seems that when the user profile loads on the website the place data loads on the server-side, meaning that it gets to the client preloaded (without making separate API requests/calls afterwards). Which means that you will have to scrap profile place data from the HTML response of the GET request to the following url:
https://www.roblox.com/users/{userId}/profile
To make your life easier when writing the scrapping code you can test the above endpoint for your profile and search the response for the ids and names of the games that you have there. This will help you know which segments/tags of the html to target when writing the code.
What exactly are you trying to get here, could you elaborate?
Do you mean as in the Games the user has created, or do you mean Games the user has favorited, Or perhaps **Games that are in the users inventory (aka crude play history)?
Please go more in detail here because im quite lost looking at this.
By “I want to be able to get the games a player has added to his profile” I mean the games that the player added to the profile. Like, when you go to one of your games and click on the 3 dots on the top right there is an option called “Add to profile” and everyone who goes on your profile can now see the games. I’m trying to get those games that players manually added to their profile.
I want to replicate the roblox profile but for all players, including banned players, which currently you cannot see the profile of without going to external websites.
I swear there is a website other than the official Roblox one where you can check a banned player’s profile without being redirected. I am not sure if that includes games though.
Also, I don’t really recommend roproxy for actual games. The problems I experienced with roproxy was some api endpoints simply being inaccessible due to roproxy and also roproxy strips cookie headers. Not sure about api keys but even if api key headers worked I wouldn’t wanna send that data to the owner who does who knows what.
Regardless there are annoying limitations with roproxy. Try and set up ur own proxy.