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

# Token

## Login via API and get Token

<mark style="color:green;">`POST`</mark> <https://mekacash.co.uk/token>

\<Description of the endpoint>

**Headers**

| Name         | Value              |
| ------------ | ------------------ |
| Content-Type | `application/json` |

**Request Body**

| Name        | Type   | Required | Description |
| ----------- | ------ | -------- | ----------- |
| username \* | string | true     | email       |
| password \* | string | true     | password    |

**Response**

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

```json
{
    "type":"bearer",
    "token":"YOUR_SECRET_KEY",
    "message":"success",
    "status":"success"
}
```

{% endtab %}

{% tab title="400 : Bad Request" %}

```json
{
    "status":"failed",
    "message":"Bad Request"
}
```

{% endtab %}

{% tab title="401 : Unauthorized" %}

```json
{
    "status":"failed",
    "message":"Incorrect username or password"
}
```

{% endtab %}
{% endtabs %}
