# 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                                                                                                                                                             |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api.omicall.com/omicall-api/authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
