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

# Token

Authentication SECRET KEY is the major step you can start before you make any request, without SECRET KEY you can't make any request. Please don't share SECRET KEY with anyone.

{% hint style="warning" %}
If you already have the SECRET KEY which is generated in your dashboard, you don't need to use api TOKEN.&#x20;
{% endhint %}

## Login via api and get SECRET KEY

<mark style="color:green;">`POST`</mark> `https://borderlesspaymentng.com/api/token`

#### Headers

| Name                                           | Type   | Description      |
| ---------------------------------------------- | ------ | ---------------- |
| content-type<mark style="color:red;">\*</mark> | String | application/json |

#### Request Body

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| password<mark style="color:red;">\*</mark> | String | password    |
| username<mark style="color:red;">\*</mark> | String | email       |

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

```json
{
    "type":"bearer",
    "token":"YOUR_SECRET_KEY",
    "mesage":"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 %}
