You can know the status of messages sent using Ultramsg API and know the status of the message if the user has read the message or not.
There are two ways to check the status of messages:
Method 1: Use ACK webhook (recommended)
These options must be enabled: Webhook on Received & Webhook on ACK.
After activating the previous two options and setting your webHook address, now when the message status changes, the status will be sent to you Realtime.
You can use webhook.site to test it easily, You can see this video.
Method 2: Use a Get a list of instance messages :
you can get a list of Instance messages using this method :
https://docs.ultramsg.com/api/get/messages
All messages will be fetched with a status like this:
{
"total": 1115,
"pages": 112,
"limit": 10,
"page": 1,
"messages": [
{
"id": 311777,
"referenceId": null,
"from": "[email protected]",
"to": "[email protected]",
"body": "WhatsApp API on UltraMsg.com works good",
"priority": 1,
"status": "sent",
"ack": "pending",
"type": "chat",
"created_at": 1651931190,
"sent_at": 1651931190,
"metadata": {}
}}
ACK status :
- pending: The message is currently in the instance.
- server: The message is currently in the WhatsApp servers.
- device: The message has been delivered to the user’s mobile phone.
- read: The message has been read by the user.
- Played: Same “read” but this for media messages.
NOTE :
The best way to check the message status and to know that the message has been delivered is “device“, This is because the status of “read” messages will not work if the user turn off read receipts on WhatsApp App.