> ## 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 Full-Body Roblox Avatar — GET /roblox/avatar

> Retrieve a user's full-body Roblox avatar image through the CA Colombia API. Returns a JSON image URL or raw PNG binary when download=true.

Use this endpoint to retrieve a user's full-body Roblox avatar image. The image is sourced from the Roblox thumbnails API at 720×720 PNG resolution. By default the endpoint returns a JSON object containing the image URL. Pass `download=true` to instead receive the raw PNG binary directly in the response body, which is useful for displaying the avatar without an extra round trip to the Roblox CDN.

<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
```

## Path Parameters

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

## Query Parameters

<ParamField query="download" type="string">
  Pass `true` to receive the avatar image as raw PNG binary (`Content-Type: image/png`) instead of a JSON response with an image URL.
</ParamField>

## Response

When `download` is omitted or not `true`, the response is a JSON object:

<ResponseField name="imageUrl" type="string">
  A URL pointing to the user's full-body Roblox avatar image hosted on the Roblox CDN, at 720×720 resolution in PNG format.
</ResponseField>

When `download=true`, the response body is raw PNG binary with `Content-Type: image/png`.

## Example Request (JSON URL)

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

## Example Response (JSON URL)

```json theme={null}
{
  "imageUrl": "https://tr.rbxcdn.com/abc123def456/720/720/Avatar/Png/noFilter"
}
```

## Example Request (Binary Download)

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

When `download=true`, the response body is the raw PNG file with no JSON envelope.

## 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-bust` | The Roblox thumbnails API returned an error or the avatar could not be processed. |
| `500`  | `Internal Server Error`                     | The image binary could not be streamed when using `download=true`.                |
