How to see if a user owns a gamepass using the Roblox API

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.

1 Like

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.

2 Likes

Does the users inventory have to be open for it to work?

1 Like

Yes it does have to be open for it to work.

1 Like

I tested, it doesn’t. The array isn’t empty when my inventory is private.

2 Likes

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.

1 Like