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

# Get user roles

`POST` `/get-user-roles`

Get the role IDs of every role a user has.

## Headers

| Name   | Value                |
| ------ | -------------------- |
| apikey | 28-Character API Key |

## Body

| Name            | Type     | Description                              |
| --------------- | -------- | ---------------------------------------- |
| userId          | string\* | ID of the user you want to get roles for |
| discordBotToken | string\* | Your Discord bot token                   |
| guildId         | string\* | Server ID                                |

## Response

<Tabs>
  <Tab title="200: OK">
    ```json theme={null}
    {
      "success": true,
      "roles": ["123456789", "987654321"]
    }
    ```
  </Tab>

  <Tab title="400: Bad Request">
    **Error**\
    You did not provide:

    * Valid userId
    * Valid discordBotToken
    * Valid guildId

    Check `response.error` for details.
  </Tab>

  <Tab title="401: Unauthorized">
    **Error**\
    You didn't provide a working apikey.
  </Tab>

  <Tab title="429: Too Many Requests">
    You called this too many times too quickly. Try again later.
  </Tab>
</Tabs>
