There’s a way to check if a player own’s an asset but how would I do the same for a bundle using a web api?
Only way I could think of is by checking if the player owns the bundle torso but if torso doesn’t exist then I’m guessing I check if the player own’s one of the bundle accessories?
I don’t think there is an API endpoint that allows you to check to see if someone has a bundle but you could use one of these API endpoints to get the bundles they have and then just loop through all the bundles the user has to see if they have the bundle that your looking for.
I think this will be ur best option to do with the Roblox web API endpoints go.
No, my way of checking torso has no problem with privacy as I even tried right now using my guest browser since it’s not logged in and it returned me that my main does own a torso of the torso id I gave it
If a players inventory is set to private, the only way to obtain inventory information data would be from outdated information, such as that provided by the wayback machine. Otherwise, if you check using a web API (btw using PlayerOwnsBundle() is much better) then it will return an error. To account for that error, you should use a pcall, so that instead of returning an error, it will return false instead, which could transport them do a different server or kick them.
-- Client Side Example
local MarketplaceService=game:GetService('MarketplaceService')
local players=game:GetService('Players')
local player=players.LocalPlayer;
local bundleId=201 -- Headless Horseman Bundle Id
local success,owned=pcall(MarketplaceService.PlayerOwnsBundle,MarketplaceService,player,bundleId)
if success then
if owned then
print('Bundle owned.');
else
print('Bundle not owned.');
end
else
print('PlayerOwnsBundle Failed.');
end
and also I’ve figured out a way ages ago since of an API that used to not exist when this was posted. https://inventory.roblox.com/v1/users/${userId}/items/${itemType}/${itemTargetId}/is-owned