Outgoing message status#
Webhook נכנס מסוג זה מכיל את הסטטוס של הודעה שנשלחה בעבר: נשלחה, נמסרה, קראה וכו'.
כדי לקבל הודעות לגבי סטטוסים של שליחה/מסירה/קבלות קריאה של הודעות שנשלחו מטלפון נייד, יש צורך להפעיל את ההגדרות הבאות:
outgoingMessageWebhook
outgoingWebhook
Webhook#
Webhook פרמטרים#
פָּרָמֶטֶר | סוּג | תֵאוּר |
---|---|---|
typeWebhook | string | Incoming webhook type. עבור webhooks מסוג זה הפרמטר מקבל את הערך outgoingMessageStatus |
chatId | string | Chat Id. צ'אט עם הודעה שעבורה קיבלת את הסטטוס. |
instanceData | object | נתוני מופע |
timestamp | integer | חותמת זמן לאירוע בפורמט UNIX |
idMessage | string | מזהה הודעה יוצאת או קובץ. מזהה הודעה יוצאת מוחזר לפי שיטות: SendMessage, SendFileByUrl, SendFileByUpload, SendLocation, SendContact, SendPoll |
status | string | מצב הודעה יוצאת או קובץ. המצב מקבל את הערכים: |
sent - הודעה נשלחה | ||
delivered - הודעה שנמסרה לנמען | ||
read - הודעה שנקראה/נצפה/נשמעה על ידי הנמען | ||
failed - אירעה שגיאה בעת שליחת הודעה לשרת WhatsApp (לא ניתן לבטל מצב זה בהגדרות SetSettings, יש צורך ליישם את העיבוד של הודעה זו) | ||
noAccount - למספר הטלפון של הנמען אין חשבון WhatsApp (לא ניתן לבטל את הסטטוס הזה בהגדרות SetSettings, יש צורך ליישם את העיבוד של הודעה זו) | ||
notInGroup - השולח אינו משתתף בצ'אט קבוצתי שאליו נשלחת ההודעה | ||
yellowCard - השעיית שליחת הודעות עקב פעילות ספאם. הודעות שנשלחות לאחר קבלת הסטטוס נשמרות בתור לשליחה למשך 24 שעות. כדי להמשיך להפעיל את המופע, עליך לבצע א reboot of the instance. | ||
description | string | תיאור שגיאה (מומלץ ליידע את המפעיל על שגיאות מערכת) |
sendByApi | boolean | האם ההודעה נשלחת דרך API: true , false |
instanceData
פרמטרים של אובייקט
פָּרָמֶטֶר | סוּג | תֵאוּר |
---|---|---|
idInstance | integer | זיהוי מופע גודל המספר השלם הוא int64. טווח הערכים כולל בין 1 ל-10 ספרות |
wid | string | זיהוי חשבון בפורמט WhatsApp |
typeInstance | string | סוג שליח מופע |
Webhook example with status sent#
{
"typeWebhook": "outgoingMessageStatus",
"chatId": "79001234567@c.us",
"instanceData": {
"idInstance": 7103000000,
"wid": "79876543210@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1727691478,
"idMessage": "3EB0608D6A2901063D63",
"status": "sent",
"sendByApi": true
}
Webhook example with status delivered#
{
"typeWebhook": "outgoingMessageStatus",
"chatId": "79001234567@c.us",
"instanceData": {
"idInstance": 7103000000,
"wid": "79876543210@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1727698517,
"idMessage": "3EB0608D6A2901063D63",
"status": "delivered",
"sendByApi": true
}
Webhook example with status read#
{
"typeWebhook": "outgoingMessageStatus",
"chatId": "79001234567@c.us",
"instanceData": {
"idInstance": 7103000000,
"wid": "79876543210@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1727698597,
"idMessage": "3EB0608D6A2901063D63",
"status": "read",
"sendByApi": true
}
Webhook example when the sender is not in the group they're sending to#
{
"typeWebhook": "outgoingMessageStatus",
"chatId": "120363347693198097@g.us",
"instanceData": {
"idInstance": 1234,
"wid": "11001234567@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1727760222,
"idMessage": "BAE5245994546A06",
"status": "notInGroup",
"sendByApi": true
}
Webhook example when sending a message with an empty file via the SendFileByUrl method#
{
"typeWebhook": "outgoingMessageStatus",
"chatId": "120363347693198097@g.us",
"instanceData": {
"idInstance": 1234,
"wid": "11001234567@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1727760222,
"idMessage": "BAE5245994546A06",
"status": "failed",
"description": "file should not be empty. URL: ...",
"sendByApi": true
}
Webhook example when sending a message with a file that is not available via link (SendFileByUrl)#
{
"typeWebhook": "outgoingMessageStatus",
"chatId": "120363347693198097@g.us",
"instanceData": {
"idInstance": 1234,
"wid": "11001234567@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1727760222,
"idMessage": "BAE5245994546A06",
"status": "failed",
"description": "upload request was failed with bad status code ([45][0-9]{2})...",
"sendByApi": true
}
or (both can occur)
{
"typeWebhook": "outgoingMessageStatus",
"chatId": "120363347693198097@g.us",
"instanceData": {
"idInstance": 1234,
"wid": "11001234567@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1727760222,
"idMessage": "BAE5245994546A06",
"status": "failed",
"description": "request was failed with bad status code ([45][0-9]{2})...",
"sendByApi": true
}
Webhook example when sending a message with a file whose size is 100 MB. (SendFileByUrl)#
{
"typeWebhook": "outgoingMessageStatus",
"chatId": "120363347693198097@g.us",
"instanceData": {
"idInstance": 1234,
"wid": "11001234567@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1727760222,
"idMessage": "BAE5245994546A06",
"status": "failed",
"description": "file size should not exceed 100 megabytes. URL: ...",
"sendByApi": true
}
Webhook example when sending a message with a file when WhatsApp media hosts are unavailable for a long time#
{
"typeWebhook": "outgoingMessageStatus",
"chatId": "120363347693198097@g.us",
"instanceData": {
"idInstance": 1234,
"wid": "11001234567@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1727760222,
"idMessage": "BAE5245994546A06",
"status": "failed",
"description": "Uploader Error",
"sendByApi": true
}
or (both can occur)
{
"typeWebhook": "outgoingMessageStatus",
"chatId": "120363347693198097@g.us",
"instanceData": {
"idInstance": 1234,
"wid": "11001234567@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1727760222,
"idMessage": "BAE5245994546A06",
"status": "failed",
"description": "failed to send message with file",
"sendByApi": true
}
Webhook example when sending a message when WhatsApp hosts are unavailable for a long time#
{
"typeWebhook": "outgoingMessageStatus",
"chatId": "120363347693198097@g.us",
"instanceData": {
"idInstance": 1234,
"wid": "11001234567@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1727760222,
"idMessage": "BAE5245994546A06",
"status": "failed",
"description": "Error: Timed Out",
"sendByApi": true
}
or (both can occur)
{
"typeWebhook": "outgoingMessageStatus",
"chatId": "120363347693198097@g.us",
"instanceData": {
"idInstance": 1234,
"wid": "11001234567@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1727760222,
"idMessage": "BAE5245994546A06",
"status": "failed",
"description": "Error: Connection Closed",
"sendByApi": true
}
Webhook example when there is no WhatsApp account on the number#
{
"typeWebhook": "outgoingMessageStatus",
"chatId": "79001234567@c.us",
"instanceData": {
"idInstance": 7103000000,
"wid": "79876543210@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1727759586,
"idMessage": "3EB0608D6A2901063D63",
"status": "noAccount",
"sendByApi": true
}
Webhook example with error SWE004#
{
"typeWebhook": "outgoingMessageStatus",
"chatId": "120363369140947676@g.us",
"instanceData": {
"idInstance": 1100000001,
"wid": "79001234567@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1700545580,
"idMessage": "BAE53478EARF25CF",
"status": "failed",
"description": "SWE004: the number of participants in the group has been exceeded - 1024",
"sendByApi": true
}
Webhook example when editing a message sent more than 15 minutes ago#
{
"typeWebhook": "outgoingMessageStatus",
"chatId": "79001234567@c.us",
"instanceData": {
"idInstance": 1101000001,
"wid": "79876543210@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1739426932,
"idMessage": "BAE56687379D581D",
"status": "failed",
"description": "15 minute editing time gap has been expired",
"sendByApi": true
}