Reading Messages
The app not only allows receiving incoming messages in real-time via webhooks but also enables reading previously received messages using the same webhook.
How it works
To read messages, please follow these steps:
- Register the
sms:received
webhook as described in the Webhooks guide if you haven't done so already. - Determine the Device ID of the device you want to read messages from by calling the
GET /devices
endpoint: - Send a request with
deviceId
and period to thePOST /messages/inbox/export
endpoint: - After receiving the request, the device will send
sms:received
webhooks for each message in the inbox for the specified period.
Notes
- The webhook will be sent for each message independently, so the order of messages is not guaranteed.
- It is recommended to split long periods into shorter ones to avoid excessive load on your webhook receiver.
- The export webhooks retry policy is the same as described in the Webhooks guide.
- The ID for incoming messages is generated based on the content of the message and is not guaranteed to be unique.