You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To make it easier to debug sms delivery issues, it is useful to be able to track a messages status. This can be done through the MessageBird Web console based on the message's recipient, but this is not always possible due to MessageBird's 2FA restrictions.
Another way is to use the REST API itself, but this requires the message's ID instead of the recipient's mobile phone number.
example:
For a .id key value "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" returned from the messages API (POST) when sending an SMS, we can retrieve the status (GET) using
This issue is imported from pivotal - Originaly created at Jul 29, 2020 by Joost van Dijk
To make it easier to debug sms delivery issues, it is useful to be able to track a messages status. This can be done through the MessageBird Web console based on the message's recipient, but this is not always possible due to MessageBird's 2FA restrictions.
Another way is to use the REST API itself, but this requires the message's ID instead of the recipient's mobile phone number.
example:
For a .id key value "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" returned from the messages API (POST) when sending an SMS, we can retrieve the status (GET) using
https://rest.messagebird.com/messages/0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
The response .recipients key could read:
{
"totalCount": 1,
"totalSentCount": 1,
"totalDeliveredCount": 1,
"totalDeliveryFailedCount": 0,
"items": [
{
"recipient": 31612345678,
"originator": null,
"status": "delivered",
"statusDatetime": "2020-07-29T10:22:37+00:00",
"messagePartCount": 1
}
]
}
for a successful delivery, or for a stalled message:
{
"totalCount": 1,
"totalSentCount": 1,
"totalDeliveredCount": 0,
"totalDeliveryFailedCount": 0,
"items": [
{
"recipient": 31612345678,
"originator": null,
"status": "sent",
"statusDatetime": "2020-07-28T14:32:28+00:00",
"messagePartCount": 1
}
]
}
If the .id value is logged, together with the recipient phone number, this would make it easy to use the API for obtaining the status.
Currently, only the error and status directly after sending is retained:
https://github.com/SURFnet/messagebird-api-client-bundle/blob/develop/src/Surfnet/MessageBirdApiClient/Messaging/MessagingService.php#L85
IT would be useful to also retain the message ID for logging purposes.
NOTE: there is a downside in logging, as this also makes it easier to retrieve the actual OTP in the message body.
Please discuss...
The text was updated successfully, but these errors were encountered: