How can I get all player created gamepasses like pls donate and other games,
I search in APIs but I can’t find
I believe you can use inventory api to look for them,
Here’s a script I just wrote which you can use to scrape all of the gamepasses created by a particular user. All you need to do is call the function and pass to it the ID of the user you want to query. It’ll return an array of gamepass IDs created by the user.
local http = game:GetService("HttpService")
local baseUrl = "https://www.roproxy.com/users/inventory/list-json?assetTypeId=34&cursor=&itemsPerPage=100&pageNumber=%s&userId=%s"
local function getUserCreatedGamepassesRecursive(userId, gamepasses, pageNumber, lastLength)
gamepasses = gamepasses or {}
pageNumber = pageNumber or 1
lastLength = lastLength or math.huge
local requestUrl = baseUrl:format(pageNumber, userId)
local success, result = pcall(function()
return http:GetAsync(requestUrl)
end)
if success then
if result then
local success2, result2 = pcall(function()
return http:JSONDecode(result)
end)
if success2 then
if result2 then
for _, gamepass in ipairs(result2.Data.Items) do
if gamepass.Creator.Id == userId then
table.insert(gamepasses, gamepass.Item.AssetId)
end
end
if result:len() ~= lastLength then
lastLength = result:len()
pageNumber += 1
getUserCreatedGamepassesRecursive(userId, gamepasses, pageNumber, lastLength)
end
end
else
warn(result)
getUserCreatedGamepassesRecursive(userId, gamepasses, pageNumber, lastLength)
end
end
else
warn(result)
getUserCreatedGamepassesRecursive(userId, gamepasses, pageNumber, lastLength)
end
return gamepasses
end
local userGamepasses = getUserCreatedGamepassesRecursive(2032622)
print(#userGamepasses) --6 gamepasses.
for _, gamepassId in ipairs(userGamepasses) do
print(gamepassId) --6 gamepass IDs.
end
Thx !!
This is the solution
Thanks Forummer for this Response, it has been very helpful with my Development.
I have Created an API Module using my Results of Research and your Helpful response above but sadly due to bugs I have removed the UserCreated Gamepass/Asset Retrieval.
Do you possibly have any details on formatting/endpoint url for Decals, Outfits, and Accessories?
This just prints “0”. Have I done something wrong?
Unfortunately roproxy is very unreliable, you should host your own proxy.
How do you make your own proxy?
The pageNumber doesnt seems to work anymore… Any Fix?
I don’t think this works
I checked that this user has many gamepasses made by herself, but with roproxy, it returns nothing. And the ‘End’ value is -1, which is wrong since the page starts from 1. How can there be -1?
I got the same problem with this script.
It only work is players have set their inventory visibility to everyone.
Mine is only visible for my friend, users I follow and users who follow me and it don’t work.
So why I can see my gamepasses in famous games like Pls Donate or Pls Buy Me?
If you’ve ever set that setting to ‘Everyone’ and joined Pls Donate, maybe the game saved your asset&gamepass info.
Otherwise, Pls Donate just uses another way to access your account inventory info.
We just don’t know the details
My friend found a kit with this script inside.
It only work with gamepasses but players don’t need to set your inventory access to everyone.
HttpService = game:GetService("HttpService")
return function(player, assetId)
local userId = player.UserId
local gamepasses = {}
local GetGamesUrl1 = "https://games.RoProxy.com/v2/users/"
local GetGamesUrl2 = "/games?accessFilter=Public&sortOrder=Asc&limit=10"
local getGamesUrl = GetGamesUrl1..userId..GetGamesUrl2
local success,result = pcall(function()
return HttpService:GetAsync(getGamesUrl)
end)
if success then
pcall(function()
result = HttpService:JSONDecode(result)
for _,GameInfo in pairs(result["data"]) do
local gameId = GameInfo.id
local url = "https://games.RoProxy.com/v1/games/%s/game-passes?limit=100&sortOrder=Asc"
url = url:format(gameId)
local success2,result2 = pcall(function()
return HttpService:GetAsync(url)
end)
if success2 then
result2 = HttpService:JSONDecode(result2)
for _,GamepassDetail in pairs(result2["data"]) do
local gamepassId = GamepassDetail.id
table.insert(gamepasses,gamepassId)
end
end
end
end)
end
return gamepasses
end
This script works perfectly for the question asked above, because it doesn’t require access to the player’s inventory. It scans their public games and lists the gamepasses they have for sale on those games.
The only change I needed to make was changing “limit=10” to “limit=50” for people who tend to make a lot of games. You could also page through them, if you wanted to go the extra mile.
I think you could deploy one with heroku. But if you want to use this for a huge game that sends over thousands of requests per day you would need to pay for the hosting. (You also need to add a payment method in order to deploy something. Keep that in mind)
This does not work - success
is false (I’ve tried printing it) and therefore it keeps returning blank tables
Hi, I can send you my system if you want. The guy I made it for scammed me a few months ago.