With the HTTP(s) API it is possible to get a collection of received messages. You need to use a time-interval and will receive a complete list of received messages in this timespan.
Call https://api.suresms.com/script/v2/GetReceivedMessage.aspx with the following parameters:
Login, password and startutcdatetime and endutcdatetime
Login | Your SureSMS account login | Mandatory |
Password | Your SureSMS account password | Mandatory |
StartUtcDateTime | From this time (in UTC), we will query all incomming messages. | Mandatory |
EndUtcDateTime | You can use this value to set an endtime, or leave it without as we will use "now" as endtime. | Optional |
jsonReponse | By default you get the response in XML, but if you add parameter jsonResponse=1 to the query the response will be returned in JSON | Optional |
Note: The parameters are NOT case senstive.
Example :
If your SureSMS account is "XXX” and your code is 8r7e3.
If you want to know the status of a message with id 435345, you must write this in your browser:
https://api.suresms.com/script/v2/GetReceivedMessage.aspx?login=XXX&password=8r7e3&startutcdatetime=2017-01-01T00:00:00
If you want to know all new messages from say 01th of January 2021:
https://api.suresms.com/script/v2/GetStatus.aspx?login=XXX&password=8r7e3&startutcdatetime=2021-01-01T00:00:00
Result
No matter if you use the first or last option, the result will be returned in this format: Message (unless you use the jsonResponse=1 parameter)