# Voice OTP

### Tích hợp và sử dụng Voice OTP[​](https://developers.antbuddy.com/bot/voice-otp#t%C3%ADch-h%E1%BB%A3p-v%C3%A0-s%E1%BB%AD-d%E1%BB%A5ng-voice-otp) <a href="#tich-hop-va-su-dung-voice-otp" id="tich-hop-va-su-dung-voice-otp"></a>

#### Mục đích[​](https://developers.antbuddy.com/bot/voice-otp#m%E1%BB%A5c-%C4%91%C3%ADch) <a href="#muc-dich" id="muc-dich"></a>

Cho phép sử dụng Alice Voice OTP từ bên thứ 3

#### API chi tiết[​](https://developers.antbuddy.com/bot/voice-otp#api-chi-ti%E1%BA%BFt) <a href="#api-chi-tiet" id="api-chi-tiet"></a>

**Tất cả API request tới hệ thống Alice:**[**​**](https://developers.antbuddy.com/bot/voice-otp#t%E1%BA%A5t-c%E1%BA%A3-api-request-t%E1%BB%9Bi-h%E1%BB%87-th%E1%BB%91ng-alice)

**Thông qua tên miền**[**​**](https://developers.antbuddy.com/bot/voice-otp#th%C3%B4ng-qua-t%C3%AAn-mi%E1%BB%81n)

```
https://alice.antbuddy.com/rest-api
```

authorize header bắt buộc:

```
Authorization: Bearer {access_token}
```

#### Get AccessToken[​](https://developers.antbuddy.com/bot/voice-otp#get-accesstoken) <a href="#get-accesstoken" id="get-accesstoken"></a>

```
Endpoint: /get-token/
Method: POST
Body: {
    "username": "username",
    "password": "password"
}

Description:
Username: tên hoặc email đã tạo bên antbuddy
Password: mật khẩu
```

### Tạo yêu cầu gọi[​](https://developers.antbuddy.com/bot/voice-otp#t%E1%BA%A1o-y%C3%AAu-c%E1%BA%A7u-g%E1%BB%8Di) <a href="#tao-yeu-cau-goi" id="tao-yeu-cau-goi"></a>

API tạo yêu cầu đọc mã cho số điện thoại:

**Xem các cuộc gọi otp hiện có**[**​**](https://developers.antbuddy.com/bot/voice-otp#xem-ca%CC%81c-cu%C3%B4%CC%A3c-go%CC%A3i-otp-hi%C3%AA%CC%A3n-co%CC%81)

```
Endpoint: /voice-otp/
Method: GET 
```

**Tạo cuộc gọi otp**[**​**](https://developers.antbuddy.com/bot/voice-otp#ta%CC%A3o-cu%C3%B4%CC%A3c-go%CC%A3i-otp)

```
Endpoint: /voice-otp/
Method: POST
Body: {
    "alarm_phonenumber": "0919273027",
    "otp": "123445",
    "maxretry": 0
}

Miêu tả:
 - alarm_phonenumber: Số điện thoại muốn nhận mã code (bắt buộc)
- otp: Mã code muốn gửi tới số điện thoại, nếu trống hoặc không gửi, hệ thống tự động tạo một mã code trải nghiệm.
- maxretry: số lần đọc lại mã , mặc định là 0, tương ứng với 1 lần đọc.
```


---

# 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://docs.antbuddy.com/huong-dan-tich-hop-api-team-technical-api-integration-guide-technical-team/antbot/voice-otp.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.
