# Xác thực

## Get AccessToken

<mark style="color:blue;">`GET`</mark> `[URL]/api/auth?apiKey=`

Lấy Access Token thông qua API KEY

#### Query Parameters

| Name   | Type   | Description                            |
| ------ | ------ | -------------------------------------- |
| apiKey | string | API key của doanh nghiệp được cung cấp |

#### Headers

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

{% tabs %}
{% tab title="200 Khi yêu cầu API thành công" %}

```
{
    "status_code": 9999,
    "instance_id": "stg",
    "instance_name": "cloud-vihat-saas-sync-public-api-77689c7b9c",
    "payload": {
        "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9 ...",
        "access_type" : "normal",
        "token_type": "Bearer"
    },
    "key_enabled": false
}
```

{% endtab %}
{% endtabs %}

**Thông tin kết quả trả về payload**

| Tham số       | Mô tả                                                                                                                                                              |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| access\_token | Access token truy cập                                                                                                                                              |
| access\_type  | <p>Có 2 loại </p><ul><li><strong>normal</strong> : Doanh nghiệp người dùng cuối</li><li><strong>bussiness</strong> : Doanh nghiệp là đối tác của OMICALL</li></ul> |
| token\_type   | Bearer                                                                                                                                                             |
