# Variables

This endpoint will retrieve the list of all the **variables** that are currently available in the bot specified by the bot [token](/connect-api/globa-platform-api/authorization.md).&#x20;

### Request

The following request will retrieve the list of all variables:

```bash
curl --location --request GET 'https://<NODE>.xenioo.com/bots/variables' \
--header 'Authorization: Bearer <BOT_AUTH_TOKEN>' \
--header 'Content-Type: application/json'
```

### Response

If successful, the response will contain the list of all the variables available for the provided **Bot Token**. The list is alphabetically sorted by **Name**.

If the bot doesn't have any variables, the **Result** array will be empty.

```json
{
    "Result": [        
        {
            "Name": "bot_channel",
            "CategoryType": 0,
        },
        {
            "Name": "bot_name",
            "CategoryType": 0,
        },        
        {
            "Name": "chat_state",
            "CategoryType": 0,
        }
    ]
}
```

The **CategoryType** value is mapped as follow:

<table data-header-hidden><thead><tr><th width="110"></th><th></th></tr></thead><tbody><tr><td>0</td><td>System</td></tr><tr><td>1</td><td>Channels</td></tr><tr><td>2</td><td>Runtime</td></tr></tbody></table>

### Response Codes

This endpoint will reply with the following standard HTTP codes.

| Code | Meaning                                                                         |
| ---- | ------------------------------------------------------------------------------- |
| 200  | Ok. The request has been successfully fulfilled.                                |
| 400  | Bad Request. The supplied token is invalid or does not have enough permissions. |
| 404  | Not Found. The bot specified by the token could not be found.                   |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mylinkconnect.com/connect-api/globa-platform-api/bots/variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
