เอกสารอ้างอิง API

Receiving Events

message.read

ใบรับการอ่านหรือใบรับการเล่นของ WhatsApp ตรวจค่า played ใน data.event.receipt_type เพื่อแยกใบรับการเล่น

Event payload

{
  "id": "evt_2f9c1a4b7e",
  "type": "message.read",
  "provider": "whatsapp",
  "account_id": "acc_8c21d0",
  "occurred_at": "2026-06-08T12:35:10Z",
  "data": {
    "conversation": { "id": "8613912345678", "type": "user" },
    "sender": { "id": "8613912345678", "type": "user" },
    "message": {
      "id": "wamid.HBgM",
      "ids": ["wamid.HBgM", "wamid.HBgN"],
      "read_at": "2026-06-08T12:35:10Z"
    },
    "read_at": "2026-06-08T12:35:10Z",
    "event": { "kind": "message_read", "receipt_type": "read" }
  }
}

ตัวอย่างใบรับการเล่น

WhatsApp · played

{
  "id": "evt_played_example",
  "type": "message.read",
  "provider": "whatsapp",
  "account_id": "acc_example",
  "occurred_at": "2026-11-10T12:00:00Z",
  "data": {
    "conversation": { "id": "100@lid", "type": "user" },
    "sender": { "id": "101@lid", "type": "user" },
    "message": {
      "id": "VOICE_EXAMPLE_001",
      "ids": ["VOICE_EXAMPLE_001", "VOICE_EXAMPLE_002"],
      "direction": "outbound",
      "played_at": "2026-11-10T12:00:00Z"
    },
    "event": { "kind": "message_read", "receipt_type": "played" }
  }
}

หมายเหตุ

  • data.message.id คือข้อความแรกที่ได้รับการยืนยัน ใบรับแบบชุดอาจแสดง ID ทั้งหมดใน data.message.ids การอ่านปกติใช้ read_at สำหรับ played ระบบส่ง data.message.played_at เมื่อมีเวลาการเล่นที่ถูกต้องจากช่องทาง data.sender คือฝ่ายที่ส่งใบรับ