How can I get all of a user's owned gamepasses using RoProxy?

Hello, I’m currently working on an update for my game which envolves accessing all the gamepasses a player/user owns. However, I have only been able to receive the 100 most recent gamepasses which a player owns.

I have looked online but I have not been able to find a solution or documentation.

Here is the URL for the http request I am currently using:

local vv = 34 -- Number for gamepasses
local Url = "https://www.roproxy.com/users/inventory/list-json?assetTypeId="..vv.."&cursor=&itemsPerPage=100&pageNumber=&sortOrder=Desc&userId="..userid

I have tried changing some of the parameters in the URL; however, none have allowed me to load more gamepasses.

If anyone has a solution, please reply as it would be greatly appreciated.

Thanks for reading! Have a great day :slight_smile:

2 Likes

I’m not familiar with the poorly documented web APIs, but it seems that endpoint has a limit on the number of items you can get in a single request. If the response indicates that there are more passes beyond your current page of passes, you can try incrementing the “pageNumber” parameter in the URL in subsequent requests and collect all the items until you’ve hit the end of the list. There’s probably information in the response (beside the actual list of passes) that tells you how many items/pages worth of information you can fetch over different requests.

3 Likes

Thanks for the reply!

I changed the “itemsPerPage” as you suggested and found that the maximum number of items per page is 100. However, I was able to find a solution by changing the “cursor” parameter in the URL in order to view other pages of the inventory.

Thanks again! Have a good day :slight_smile:

2 Likes

If anyone else finds this post and is having the same problem, I changed the “cursor” parameter of the URL to the “nextPageCursor” value returned by the previous result. I then looped this in a for loop and used a break function when the GET request returned the same value as the previous request.

Hope this helps :slight_smile:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.