> For the complete documentation index, see [llms.txt](https://tailieu.smax.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tailieu.smax.ai/bot-auto/trigger/instagram-trigger/bot-api.md).

# Bot API

{% hint style="warning" %}
**Trigger** **Bot API** sẽ giúp bạn gửi kịch bản chatbot cho khách hàng thông qua API
{% endhint %}

<figure><img src="https://1875681896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fsr3EiPwgSuzEXI3u1tC1%2Fuploads%2FMZYlU1O2MzrIWdKGLxXq%2Fimage.png?alt=media&amp;token=50d94f01-a886-4c59-995f-dcd870970e8e" alt=""><figcaption></figcaption></figure>

Trong danh sách trigger chọn Bot API:

<mark style="color:purple;">**(1)**</mark> Đặt tên trigger

<mark style="color:purple;">**(2)**</mark> Chọn kênh áp dụng

<mark style="color:purple;">**(3)**</mark> Cài đặt thời gian chạy nếu muốn

<mark style="color:purple;">**(4)**</mark> Bạn có thể lựa chọn giữa API Token hoặc Biz Token

* API Token: Chỉ sử dụng được cho riêng API được tạo ra do trigger đó, không sử dụng được cho API do trigger khác tạo ra. Ưu tiên sử dụng API này để đảm bảo bảo mật
* Biz Token: Token được sử dụng cho toàn bộ API

<mark style="color:purple;">**(5)**</mark> Chọn block gửi khi gọi API và chọn **Lưu** để tạo trigger

<figure><img src="https://1875681896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fsr3EiPwgSuzEXI3u1tC1%2Fuploads%2FIofsK5WhQrjmaPbebhVl%2Fimage.png?alt=media&amp;token=5acb5c78-5e59-497e-bd50-5be941a7c510" alt=""><figcaption></figcaption></figure>
