I want to see if a user owns a gamepass with the api. (not in studio). Is there any endpoints to do this? I looked here https://inventory.roblox.com/docs but no luck.
I’m using node.js.
I want to see if a user owns a gamepass with the api. (not in studio). Is there any endpoints to do this? I looked here https://inventory.roblox.com/docs but no luck.
I’m using node.js.
You’re looking in the right place, just not close enough.
Use https://inventory.roblox.com/v1/users/{userId}/items/GamePass/{gamePassId} (Data will be an empty array if no items are no found with the gamePassId). This is also the same endpoint that the engine uses.
Does the users inventory have to be open for it to work?
Yes it does have to be open for it to work.
I tested, it doesn’t. The array isn’t empty when my inventory is private.
Are you testing it with your inventory or someone else’s inventory that’s private?
Misread this. I think Roblox’s API disregards a players inventory privacy settings for specific stuff like checking if a player owns a gamepass because this is used internally for services like MarketPlaceService.