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

# Get User Avatar

> View a user's avatar.

### Changelog
| Version      | Description |
| ------------ | ------------|
|0.50.0        | Added       |

## OpenAPI

````json GET /api/v1/users.getAvatar
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "User Management"
  },
  "servers": [
    {
      "url": "https://apiexplorer.support.rocket.chat"
    }
  ],
  "tags": [
    {
      "name": "LDAP"
    },
    {
      "name": "Permissions"
    },
    {
      "name": "Roles"
    },
    {
      "name": "Users"
    }
  ],
  "paths": {
    "/api/v1/users.getAvatar": {
      "get": {
        "summary": "Get User Avatar",
        "tags": [
          "Users"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "image/svg+xml": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "errorType": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "success": "false",
                      "error": "The required \"userId\" or \"username\" param was not provided [error-user-param-not-provided]",
                      "errorType": "error-user-param-not-provided"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "get-api-v1-users.getAvatar",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "example": "BsNr28znDkG8aeo7W",
            "in": "query",
            "name": "userId",
            "description": "The user ID. Alternatively, you can enter the `username` parameter.",
            "required": "true"
          },
          {
            "$ref": "#/components/parameters/UserId"
          },
          {
            "$ref": "#/components/parameters/Auth-Token"
          }
        ],
        "description": "View a user's avatar.\n\n### Changelog\n| Version      | Description |\n| ------------ | ------------|\n|0.50.0        | Added       |"
      }
    }
  },
  "components": {
    "parameters": {
      "UserId": {
        "name": "X-User-Id",
        "in": "header",
        "description": "The authenticated user ID.",
        "required": "true",
        "schema": {
          "type": "string"
        },
        "example": "rbAXPnMktTFbNpwtJ"
      },
      "Auth-Token": {
        "name": "X-Auth-Token",
        "in": "header",
        "description": "The authenticated user token.",
        "required": "true",
        "schema": {
          "type": "string"
        },
        "example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f"
      }
    }
  }
}
````

