Get Bundles using GetInventory()?

How would I get all the bundles that the player owns using “GetInventory”?
AvatarEditorService:GetInventory({Enum.AvatarAssetType.???})

Enum.AvatarAssetType doesn’t have either Package, Bundle or Character to get the bundles.

2 Likes

I’m fairly sure you have to use an API to get what bundles they own:
https://catalog.roblox.com/docs/index.html#!/Bundle/get_v1_users_userId_bundles

(keep in mind you will have to use a proxy, because for some reason, Roblox doesn’t allow scripts to access the Roblox API)

You really can’t that way due to this 403 error.

{
  "errors": [
    {
      "code": 2,
      "message": "You are not authorized to view this users' inventory.",
      "userFacingMessage": "Something went wrong"
    }
  ]
}
1 Like

If the user has their inventory privated, then yeah, you can’t see what bundles they have. Same thing happens with AvatarEditorService:GetInventory() as far as I know.

But at least AvatarEditorService:GetInventory() has AvatarEditorService:PromptAllowInventoryReadAccess() to allow it, so it’s really not the same.

I’m talking about how you can’t get inventory items if the player’s inventory is privated. I know AvatarEditorService has another function to check, but the two functions work similar surrounding how they handle privated inventories.

It should be easy to check if you received a 403 from an API request so it shouldn’t matter too much.

If you need help implementing it, feel free to ask.

Yeah I know by checking the http response StatusCode but I need it to somehow get all the bundles without them needing to public their inventory all the time just like GetInventory() would work.

Currently, there is no way to do that without using the API.

Yeah would be good if Package or whatever gets added to Enum.AvatarAssetType.