Sự kiện người dùng nhận tin nhắn ZNS

Khi Official Account gửi tin nhắn cho người dùng và tin nhắn đã đến thiết bị người dùng, hệ thống InfiniX sẽ gửi đến Webhook Url của ứng dụng một HTTP request như sau

  • URL: webhook URL của ứng dụng

  • Method: POST

  • Content Type: application/json

  • x-validate-key: "Key webhook trên portal"

Example response

{
    "sessionId": "1c62e4dc-c959-478d-a5f4-3434bf5ad608",
    "znsInfo": {
       "phone": "8436365****",
       "status": "RECEIVED",
       "type": "NORMAL",
       "createdAt": "2024-10-08T02:51:29.933Z",
       "error": null
    }
}

Cấu trúc thuộc tính

Thuộc tính
Kiểu dữ liệu
Mô tả

sessionId

string

Mỗi request sẽ sinh ra 1 sessionId để nhận diện

phone

string

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

status

string

Trạng thái tin nhắn

type

string

Loại tin ZNS

createdAt

Date

Thời gian khởi tạo tin

error

string

Hiển thị message lỗi khi có lỗi xảy ra

Last updated