> For the complete documentation index, see [llms.txt](https://api-docs.vaultoro.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-docs.vaultoro.com/tokens.md).

# Tokens

## Get Tokens

<mark style="color:blue;">`GET`</mark> `https://api.vaultoro.com/v1/tokens`

This endpoint allows you to get your API tokens.

#### Headers

| Name          | Type   | Description             |
| ------------- | ------ | ----------------------- |
| Authorization | string | Your main bearer token. |

{% tabs %}
{% tab title="200 API tokens successfully retrieved." %}

```
{
    "data": [
        {
            "expires": 1654870020,
            "scopes": [
                "api"
            ],
            "createdAt": 1623334020,
            "referenceId": "20c96eaf-4e40-44ae-b697-650e0ae64d5e"
        }
    ]
}
```

{% endtab %}

{% tab title="404 Could not find any tokens." %}

```
{
    "data": []
}
```

{% endtab %}
{% endtabs %}

## Create Token

<mark style="color:green;">`POST`</mark> `https://api.vaultoro.com/v1/tokens`

Create API tokens for your account. Make a note of the token that is returned since you cannot access this again. \
\
**Currently you can only create tokens within the Vaultoro dashboard.**

#### Headers

| Name          | Type   | Description            |
| ------------- | ------ | ---------------------- |
| Authorization | string | Your main bearer token |

#### Request Body

| Name    | Type   | Description                                               |
| ------- | ------ | --------------------------------------------------------- |
| expires | number | The unix epoch time at which the token expires.           |
| scope   | string | The scope in which the token works in, 'read' or 'write'. |
| captcha | string | The value of the captcha on the Vaultoro dashboard.       |

{% tabs %}
{% tab title="200 " %}

```
{
    "data": {
        "expires": 1595535601,
        "referenceId": "fe22dc78-f266-4584-9071-95bbffd08429",
        "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
    }
}
```

{% endtab %}
{% endtabs %}

## Delete Token

<mark style="color:red;">`DELETE`</mark> `https://api.vaultoro.com/v1/tokens/:referenceId`

Delete any of your API tokens.

#### Path Parameters

| Name        | Type   | Description                                     |
| ----------- | ------ | ----------------------------------------------- |
| referenceId | string | The referenceId of the token you want to delete |

#### Headers

| Name          | Type   | Description            |
| ------------- | ------ | ---------------------- |
| Authorization | string | Your main bearer token |

{% tabs %}
{% tab title="200 " %}

```
{"data":{"success":true}}
```

{% endtab %}
{% endtabs %}
