I’m working for an update to my game and I need help finding an api to get a list of all gamepasses that a user owns in their roblox inventory.
I originally used something similar to the following roproxy url. However, it now seems to be depreciated giving a 404 error and I have been unable to find any alternatives when searching online.
This is not possible without the user’s permission, which currently requires them to offer up their password/OAuth2 token. There are no native APIs that circumnavigate that either
local HttpService = game:GetService("HttpService")
local function I(url, errorMessage)
local success, result = pcall(function()
return HttpService:GetAsync(url)
end)
if success then
return HttpService:JSONDecode(result)
else
warn(errorMessage)
return nil
end
end
local function V(W, X)
local Y = {}
local Z = "https://games.roproxy.com/v2/users/" .. W.UserId .. "/games?accessFilter=2&limit=50&sortOrder=Asc"
local R = I(Z, "Failed to load user's games.")
if R and R.data then
print("Game data:", R)
for _, aa in pairs(R.data) do
local ab = aa.id
local ac = "https://games.roproxy.com/v1/games/" .. ab .. "/game-passes?limit=100&sortOrder=Asc"
local R2 = I(ac, "Error: Failed to load game passes.")
if R2 and R2.data then
for _, ad in pairs(R2.data) do
if ad.price then
table.insert(Y, ad.id)
end
end
end
end
end
return Y
end