Help Getting Assets ContentId

I’m making web endpoint requests to get the assetId’s of the clothes a player is wearing. The only trouble is I cannot actually get the shirts and pants to load properly since they need the contentId inside their ShirtTemplate property - I cannot simply use their shirts assetId.

I have no idea which endpoint (only, no in-house methods) to use to aquire the shirts content id.
Plz help.

1 Like

Hello, you can get the content id of the clothing item by using the https://assetdelivery.roblox.com/v1/asset?id=${assetId} endpoint. This endpoint should return some XML data, which you would ideally use an XML parser for, or you can do some string searching if you don’t feel like going through the hassle.

Here’s an example asset with its XML data:
https://www.roblox.com/catalog/11240162391/Pitch-Black

<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
  <External>null</External>
  <External>nil</External>
  <Item class="Shirt" referent="RBX0">
    <Properties>
      <Content name="ShirtTemplate">
        <url>http://www.roblox.com/asset/?id=11240162384</url>
      </Content>
      <string name="Name">Shirt</string>
      <bool name="archivable">true</bool>
    </Properties>
  </Item>
</roblox>

Hope this helped. :slight_smile:

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.