pageNumber in User Inventory API Seems Broken

Hey, I’m using the User Inventory API to get the Player Inventory and I found that the pageNumber feature is Broken.
No matter the number I set, it seems to default to 1.

https://www.roproxy.com/users/inventory/list-json?assetTypeId=34&cursor=&itemsPerPage=1&pageNumber=3&userId=1874241968

You can try that link for yourself and change the pageNumber. The Result is always the same

Expected behavior

The pageNumber should return the data for that page, currently it seems to be default to 1 even if we change it!

4 Likes

Thanks for the report! We’ll follow up when we have an update for you.

2 Likes

My question is what the expected behaviour truly is? The expected behaviour you list does not appear to match what the API sets out to achieve by the presence of a cursor parameter.

cursor is accepted on this page which acts as the iterator for this page, it’s likely that pageNumber has a different purpose which appears to be the case! Notice that Start and End are populated with the start and end index of item that would / should appear on the page inputted into pageNumber (this is more noticeable when using a non-one value for itemsPerPage). It’s worth also giving notice to the null value on TotalItems; implying this API had more functionality at some point in the past, possibly regarding pageNumber

Additionally, supporting pageNumber to it’s full-meaning may cause conflict (if I input both a cursor and a pageNumber, what should the API return?) In my opinion, this is not a bug with the API but rather just poor documentation on how this API should be used (which is to be expected since this API is not publicly documented, use https://inventory.roblox.com/docs for better documented similar APIs)

1 Like

Ah right!
Now I see the variable “nextPageCursor”:“169191363”
Thanks!

1 Like

Seems like we figured this out! Closing the thread.