Note:
For testing purposes, we recommend you first send a message using the Getting Started Guide. Alternatively, you can test this method using the provided code sample.
The get_for_number method retrieves a delivery report by phone number as well as batch ID.
print(sinch_client.sms.delivery_reports.get_for_number(send_batch_response.id, recipient))When you run it, you should see an output like the following:
GetSMSDeliveryReportForNumberResponse(at='2024-10-25T10:02:42.148Z',
batch_id='01JB1J1M5BM5XQ8Q0ZWBM44E14', code=0, recipient='447..3',
status='Delivered', applied_originator=None, client_reference=None,
number_of_message_parts=None, operator=None,
operator_status_at='2024-10-25T10:02:00Z', type='recipient_delivery_report_sms')The response contains a number of useful fields:
atis a timestamp of when a delivery report was createdcodeis the delivery report error codestatusis the delivery status of a message
This information can help you ascertain whether a person successfully recieved a message, as well as allowing you to drill down into causes of failure.
See more delivery report tutorials
- Index Page
- Retrieve a delivery report for a batch
- Retrieve a delivery report for a specific recipient
- Retrieve a list of delivery reports