Mark a WhatsApp message as read
POST
/v1/whatsapp/messages/{message_id}/read
const ack = await bird.whatsapp.markRead("wam_01krdgeqcxet5s7t44vh8rt9mg", {
typing_indicator: true,
});
ack.typing_indicator; // trueack = client.whatsapp.mark_read("wam_01krdgeqcxet5s7t44vh8rt9mg", typing_indicator=True)
print(ack.typing_indicator)ack, err := client.Whatsapp.MarkRead(context.Background(), "wam_01krdgeqcxet5s7t44vh8rt9mg", bird.WhatsappMarkReadParams{
TypingIndicator: bird.Ptr(true),
})
if err != nil {
log.Fatal(err)
}
fmt.Println(ack.TypingIndicator)$ack = $bird->whatsapp->markRead(
'wam_01krdgeqcxet5s7t44vh8rt9mg',
(new WhatsAppReadReceiptRequest())->setTypingIndicator(true),
);
var_dump($ack->getTypingIndicator());bird whatsapp mark-read <message-id> --typing-indicator=truecurl -X POST "https://us1.platform.bird.com/v1/whatsapp/messages/{message_id}/read" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"typing_indicator": true
}'Respuesta202
{
"typing_indicator": true
}
Marks an inbound WhatsApp message as read, showing the contact the blue
ticks. WhatsApp also marks every earlier message in that conversation read.
Pass typing_indicator: true to show a typing indicator as well. WhatsApp
clears it when you send your next message, or after 25 seconds, whichever
comes first, and there is no call to clear it early, so ask for one only
when you are about to reply. WhatsApp cannot show a typing indicator without
a read receipt, so both arrive together.
The acknowledgement is sent asynchronously: a 202 means Bird accepted the
request, not that WhatsApp has shown it. Nothing reports back, because
WhatsApp publishes no delivery, status or failure callback for an
acknowledgement, so there is nothing to poll and no webhook event.
Repeating the call is safe, and each call restarts the 25-second typing
window. To refresh the indicator, send a fresh Idempotency-Key or none at
all: a replayed key answers from the stored response without acknowledging
anything again.
Only an inbound message can be marked read. WhatsApp allows this for 30
days after receipt, but Bird keeps the provider id a receipt needs for 15
days, so a message older than that answers 404. A message Bird sent, or
one that never reached WhatsApp, answers 422.
Parámetros
message_id
string
ID of the inbound message to acknowledge.
Cuerpo de la solicitud
typing_indicator
boolean
Show a typing indicator to the contact as well as marking the message read. WhatsApp clears it when you send your next message, or after 25 seconds, whichever comes first. Only ask for one if you are about to reply.
Carga de respuesta
typing_indicator
boolean
obligatorio
Whether a typing indicator was requested alongside the read receipt.
Recursos relacionados
Continúa con la documentación, guías y ejemplos sobre este tema. Los recursos están en inglés.
Comprender el conceptoShould I use a Bird SDK or call the API directly?Seguir la ruta de aprendizajeBuild your first integrationGuía de implementaciónSend your first email
Obtener un resumen de implementación