Goal: I want to make a bot that promotes users in a group based on how many shirts/pants they bought
Issue: I don’t know what API to use to check if a shirt/pants is owned by a group.
What I’ve tried: I’ve looked on the Developer Hub, Api Docs, and can’t find anything, I could just be blind
What I already have: I have discovered this API where you can find all of the shirts owned by the user. I can make the bot scan through every one to count how many are owned by a group, though. https://inventory.roblox.com/v1/users/96185281/inventory/Shirt?itemsPerPage=999999999
What I need: I need the API for checking if a specific shirt/pants ID is owned by a group
Thanks for the help!
This has to be external API that returns JSON
Use this method and check if the
Creator.CreatorType is equivalent to a group.
This needs to be an external API, I forgot to mention that. It would have to be something that returns JSON.
You could use this:
and check the
I believe this is what MarketplaceService uses.
Alternatively, you could use: Catalog Api
(Though I’m not sure if this helps your use case)
local item = 000000 -- id of the item
local MPS = game:GetService('MarketplaceService')
local Info = MPS:GetProductInfo(item)
if Info.CreatorType == 'Group' then
print('Is owned by group')
Full API for GetProductInfo():
Thanks for the help! It worked!
I think you could use:
to get a JSON table like this:
I believe you can then you can use the “CreatorType” and the “CreatorTargetId” properties to check if the asset was created by your group.