Message API allows you to use webhooks to retrieve incoming messages and message statuses. You can setup webhooks for each individual application on the application page.
RingRing's IP addresses for the webhooks
- 194.78.45.194
- 80.169.61.10
- 81.246.100.2
- 213.246.242.36
You can mix up the format used in the webhook. You will see an example of each below.
Incoming messages
{
"MessageId":"UNIQUE-MESSAGE-ID",
"Reference":null,
"From":"32485123456",
"To":"8686",
"Message":"My message with the api",
"Country":"BE",
"TimeReceived":"2016-07-04 14:21:05"
}
The reference on incoming message will always be the reference of the last SMS sent through Message API to the enduser.
Message statuses
{
"MessageId":"UNIQUE-MESSAGE-ID",
"Reference":null,
"StatusCode":"200",
"StatusDescription":"Delivered",
"TimeScheduled":"2018-05-04 14:20:56",
"TimeSubmitted":"2018-05-04 14:20:57",
"DeliveryTime":"2018-05-04 14:20:58",
"Country":"BE",
"ResultCode":0,
"ResultDescription":"Success",
"From":"8686",
"To":"32485123456",
"Message":"Incoming message test",
"MessageEncoding": "TEXT",
"NumberOfParts": 1,
"NumberOfChars": 21
}
Simulating web services
If you want to test the webhooks but do not have access to a web service yet, you can use http://requestb.in to create a free temporary and private web service storing any webhook result.
Allowing to quickly test the results of queries by setting up a http://requestb.in url as web service.
A concrete example is to use a requestb.in URL into the Status URL of your application settings or as body parameter when calling the Message Service.
0 Comments