# Token Configuration

{% hint style="info" %}
Things after colons show variables. Make sure to replace them!
{% endhint %}

## Check token

<mark style="color:blue;">`GET`</mark> `https://accountable.pixelninja.dev/:token`

This will check if a token is valid. This is recommended on startup to ensure you have a valid token. The Node.js module does this automatically. This endpoint can be called once per second.

#### Path Parameters

| Name  | Type   | Description             |
| ----- | ------ | ----------------------- |
| token | string | This is your API token. |

{% tabs %}
{% tab title="200 The token provided is valid and ready for use with the API" %}

```
{"code":200,"message":"OK"}
```

{% endtab %}

{% tab title="400 The provided value is too short/invalid." %}

```
{"code":400,"message":"Bad request"}
```

{% endtab %}

{% tab title="404 This token is not usable on this API. Ensure you are using the correct value." %}

```
{"code":404,"message":"Not found"}
```

{% endtab %}
{% endtabs %}

## Delete Entire Database

<mark style="color:red;">`DELETE`</mark> `https://accountable.pixelninja.dev/:token`

This will delete all user info and token info. No data will be saved and the token will not be usable at all. This is permanent and should only be done if you are 100% sure. Make a backup before deleting! Although this doesn't really apply, the ratelimit is 1 request per second.

#### Path Parameters

| Name  | Type   | Description             |
| ----- | ------ | ----------------------- |
| Token | string | This is your API token. |

{% tabs %}
{% tab title="204 Token deleted successfully." %}

```
{"code":204,"message":"No content"}
```

{% endtab %}

{% tab title="400 The token provided was invalid." %}

```
{"code":400,"message":"Bad request"}
```

{% endtab %}
{% endtabs %}
