# Access token info

`GET /token.info`

## Description

Get information about the access token, including the authenticated user/bot
and granted scopes.

**No specific scope required.**

---

**OpenAPI Spec:** [chat-v1.json](https://developer.ro.am/chat-v1.json)

## Authentication

```
Authorization: Bearer YOUR_API_KEY
```

## Responses

### 200 - Token info retrieved successfully

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `user` | object | Yes | The authenticated user or bot |
| `bot` | object | No | The bot persona associated with the token. Present only for personal access tokens, where `user` is the authenticated person and `bot` is the persona that messages are posted as. Omitted for organizat |
| `clientId` | string | Yes | The API client (app) ID this token belongs to. |
| `scopes` | string[] | Yes | List of OAuth scopes granted to this token |
| `roam` | object | Yes | Information about the Roam workspace |

**user**:

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | string | Yes | User/bot ID |
| `name` | string | Yes | Display name |
| `imageUrl` | string | No | Profile image URL |
| `email` | string | No | Email address. Included for personal access tokens with the `user:read.email` scope. |

**bot**:

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | string | Yes | Bot ID |
| `name` | string | Yes | Bot display name |
| `imageUrl` | string | No | Bot profile image URL |

**roam**:

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | string | No | The Roam's external ID |
| `name` | string | No | The Roam's display name |
| `imageUrl` | string | No | URL of the Roam's profile image |
| `iconUrl` | string | No | URL of the Roam's icon |


#### Example Response

```json
{
  "user": {
    "id": "b893c426-6d54-4d9a-8e71-6bd53b26124e",
    "name": "My Bot",
    "imageUrl": "https://ro.am/card-images/b893c426-6d54-4d9a-8e71-6bd53b26124e"
  },
  "clientId": "8f3a1c2e-9b4d-4f6a-bc11-2d3e4f5a6b7c",
  "scopes": [
    "chat:read",
    "chat:write",
    "user:read",
    "user:read.email"
  ],
  "roam": {
    "id": "12QJUIKR29",
    "name": "Acme Corp",
    "imageUrl": "https://ro.am/card-images/b5313458-1363-4832-a408-deaf740ad014",
    "iconUrl": "https://ro.am/card-images/08705e4f-7e32-4a5f-8f57-39e24eaadcbd"
  }
}
```

### 401 - Presented invalid authentication credentials.

### 500 - An internal error occurred.

---

*Machine-readable API documentation.*
*Full documentation: https://developer.ro.am/docs/api/token-info*
