I’m using the api "https://apis.roblox.com/game-passes/v1/users/{UserId}/game-passes?count=100; however, I haven’t been able to find a way of obtaining more than just the first page of the user’s inventory.
I’ve looked on the forum; however, most posts refer to the older api and use parameters which no longer work with the newer api. Such as: pageNumber
If a response includes a value for nextPageToken, use that value in the pageToken parameter of the subsequent request to retrieve the next page. For more information, see Pagination.
If the number of results is divisible by maxPageSize (for example, you have 50 results and a maxPageSize of 25), you can encounter a situation in which your response includes a value for nextPageToken, but a request using that token returns no results:
GET /cloud/v2/users/{userId}/inventory-items?maxPageSize=25&pageToken=cccDDD
{
"inventoryItems": [],
"nextPageToken": ""
}
When implementing pagination in your app, best practice is to check not just for a non-empty nextPageToken, but also for a non-empty inventoryItems array.
No, api.roblox.com is the deprecated api endpoint. All api endpoints are slowly migrating to the new apis.roblox.com endpoint which open cloud itself uses.
This endpoint has an exclusiveStartId query which is used instead of the regular pagination methods. (“nextPageToken”). Your endpoint should look like this:
ExclusiveStartId returns a list of gamepasses after a specific gamepass, use the last gamepass id returned from the array as the exclusiveStartId.
@venviqr’s method is also an alternative and can be used, I suggest marking them as the solution if their method works better for you as the cloud api also uses apis.roblox.com