Kiểm tra khách hàng đã cấp quyền gọi

Lưu ý:

  • Đối với các API sử dụng cho Shop thì API_KEY: <api_key>.Thông tin base_url của Shop

  • Đối với các API sử dụng cho Partner thì API_KEY: <shop_key>.Thông tin base_url của Partner

CheckConsent

post
Body
oa_idstring · int64Optional
phonestringOptional
Responses
200
A successful response
application/json
post
POST /CheckConsent HTTP/1.1
Host: $BASE_URL.Zalo
Content-Type: application/json
Accept: */*
Content-Length: 31

{
  "oa_id": "text",
  "phone": "text"
}
200

A successful response

{
  "error": 1,
  "expired_time": "2025-08-02T02:25:04.582Z",
  "message": "text"
}

Request:

curl --location '$BASE_URL.Zalo/CheckConsent' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer $API-KEY' \
--data '{
  "oa_id": "<int64>",
  "phone": "<string>"
}'

Response:

{
  "error": 0,
  "expired_time": "2019-08-24T14:15:22Z",
  "message": "string"
}

Cấu trúc body của request

Tham số
Kiểu dữ liệu
Mô tả

oa_id

int64

ID của OA

phone

string

Số điện thoại người nhận

Cấu trúc thuộc tính dữ liệu trả về

Tham số
Kiểu dữ liệu
Mô tả

error_code

int

Mã lỗi

message

string

Thông báo lỗi

expired_time

string<date-time>

Ngày hết hạn

Last updated