> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.cacolombia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Roblox 3D Avatar Data — GET /roblox/avatar-3d

> Retrieve a user's Roblox 3D avatar model data, including OBJ, MTL, and texture file references plus camera and bounding-box metadata.

Use this endpoint to retrieve a user's Roblox avatar as a 3D model. The CA Colombia API fetches the model data from the Roblox thumbnails API and returns a structured JSON object containing the OBJ geometry file reference, the MTL material file reference, an array of texture file references, and camera and bounding-box metadata. You can use this data to load and render the character's avatar in a 3D scene.

<Note>
  This endpoint only works for your own account. The authenticated session must belong to the same `userId` in the path. Requests are rate-limited to **5 per minute**.
</Note>

<Warning>
  The user must have a Roblox account linked to their CA Colombia profile. If no Roblox provider is connected, the request will return a `403 Forbidden` error.
</Warning>

## Endpoint

```text theme={null}
GET https://api.cacolombia.com/v1/users/:userId/roblox/avatar-3d
```

## Path Parameters

<ParamField path="userId" type="string" required>
  The Snowflake ID of the user whose 3D avatar data you want to retrieve. Must match the authenticated user's ID.
</ParamField>

## Response

<ResponseField name="obj" type="string">
  A reference string for the OBJ geometry file of the 3D avatar model, as returned by the Roblox API.
</ResponseField>

<ResponseField name="mtl" type="string">
  A reference string for the MTL material file of the 3D avatar model, as returned by the Roblox API.
</ResponseField>

<ResponseField name="textures" type="array">
  An array of reference strings, one for each texture image referenced by the MTL file.
</ResponseField>

<ResponseField name="camera" type="object">
  Suggested camera configuration for rendering the avatar.

  <Expandable title="camera fields">
    <ResponseField name="position" type="object">
      The suggested camera position in 3D space with `x`, `y`, and `z` number fields.
    </ResponseField>

    <ResponseField name="direction" type="object">
      The suggested camera direction vector with `x`, `y`, and `z` number fields.
    </ResponseField>

    <ResponseField name="fov" type="number">
      The suggested camera field of view in degrees.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="aabb" type="object">
  The axis-aligned bounding box of the avatar model, useful for centering or fitting the model in a viewport.

  <Expandable title="aabb fields">
    <ResponseField name="min" type="object">
      The minimum corner of the bounding box with `x`, `y`, and `z` number fields.
    </ResponseField>

    <ResponseField name="max" type="object">
      The maximum corner of the bounding box with `x`, `y`, and `z` number fields.
    </ResponseField>
  </Expandable>
</ResponseField>

## Example Request

```bash theme={null}
curl -X GET "https://api.cacolombia.com/v1/users/112233445566778899/roblox/avatar-3d" \
  --cookie "access_token=<your_access_token>"
```

## Example Response

```json theme={null}
{
  "obj": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2",
  "mtl": "b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3",
  "textures": [
    "c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
    "d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5"
  ],
  "camera": {
    "position": { "x": 0.0, "y": 4.5, "z": 12.3 },
    "direction": { "x": 0.0, "y": -0.2, "z": -1.0 },
    "fov": 45.0
  },
  "aabb": {
    "min": { "x": -1.2, "y": 0.0, "z": -0.5 },
    "max": { "x": 1.2, "y": 5.8, "z": 0.5 }
  }
}
```

## Error Responses

| Status | Error                                     | Description                                                                |
| ------ | ----------------------------------------- | -------------------------------------------------------------------------- |
| `401`  | `Unauthorized`                            | No valid authentication token was provided.                                |
| `403`  | `Unauthorized`                            | The authenticated user does not match the `userId` in the path.            |
| `403`  | `Forbidden`                               | The user does not have a Roblox account linked to their profile.           |
| `404`  | `Unknown User`                            | No user was found with the given `userId`.                                 |
| `500`  | `Could not retrieve the user's avatar-3d` | The Roblox API returned an error or the 3D model data could not be parsed. |
