# Token

{% 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 %}
