12-13-2021 05:15 AM - last edited on 10-03-2023 04:40 AM by Shahzad_Ismail
Hello. I'm having an issue retrieving incoming messages using the SMS API.
When using the Python example in here, with the service plan id, api token, and url displayed in my dashboard, I receive only an empty list.
Just in case, I checked that there were messages received in the dates I was querying, and several do show up in the dashboard as incoming messages.
I should note the reason I am trying to manually retrieve these messages is due to an error on our end with our callback server, which failed to receive the incoming message callbacks from the past two weeks. Not sure if that might be relevant to the problem.
Is there something that might be messing up this functionality?
Solved! Go to Solution.
12-14-2021 03:51 AM - edited 12-14-2021 03:51 AM
Firstly we request that you check the start and stop days you are querying because we only store messages for the last 14 days and so the dates in your request must fall into his period. By default we use the last 24 hours if a time period is not specified in the request.
Another thing to note is that the MO url (the callback) needs to be able to receive MO messages from us. Refer to: https://developers.sinch.com/docs/sms/guide/
This states: “Inbound messages can be listed and retrieved like batch messages and they can also be delivered by callback requests like delivery reports.”
If you are still encountering issues then please contact the Sinch Support team.
12-14-2021 03:51 AM - edited 12-14-2021 03:51 AM
Firstly we request that you check the start and stop days you are querying because we only store messages for the last 14 days and so the dates in your request must fall into his period. By default we use the last 24 hours if a time period is not specified in the request.
Another thing to note is that the MO url (the callback) needs to be able to receive MO messages from us. Refer to: https://developers.sinch.com/docs/sms/guide/
This states: “Inbound messages can be listed and retrieved like batch messages and they can also be delivered by callback requests like delivery reports.”
If you are still encountering issues then please contact the Sinch Support team.