Callback (Webhook)
Viber Messaging status notifications
Callbacks are notifications that you 've asked Routee to send back to you when the status of your Viber campaign's messages change.
Viber Messaging Callbacks##
Your callback service will receive a POST HTTP request with the following request body for an individual message progress of the Viber campaign:
{
"trackingId": "string",
"campaignTrackingId": "string",
"to": "string",
"from": "string",
"groups": ["string"],
"country": "string",
"status": {
"name": "string",
"reason": {
"detailedStatus": "string",
"description": "string"
},
"updatedDate": "string"
},
"body": {
"text": "string",
"imageURL": "string",
"viberAction": {
"caption": "string",
"targetUrl": "string"
}
},
"ttl": integer,
"label":"label of campaign",
"inboundUrl": "string",
"applicationName": "string",
"price": double,
"direction": "string",
"originatingService": "Viber",
"createdAt": "string"
}
KEY | DESCRIPTION |
---|---|
trackingId | The tracking Id of the Viber message. |
campaignTrackingId | The tracking Id of the Viber campaign. |
to | The recipient of the Viber message. |
from | The senderId of the Viber message. |
groups | All contact groups (tags) that this contact belongs to. |
status.name | The status name of the Viber message. |
status.reason | The reason of the status. |
status.reason.detailedStatus | The detailed status. |
status.reason.description | The description of the detailed status. |
status.updatedDate | The date of the last status change of the Viber message. |
body.text | The text of Viber message. |
body.iosFallbackText | Alternative message that will be sent after TTL range expiration. |
body.imageURL | The url of the image. |
body.viberAction.caption | The displayed text on the button. |
body.viberAction.targetUrl | The target URL of the Viber action. |
body.viberFile | Represents the file of the viber message. |
body.viberFile.fileName | File name of the viber message. |
body.viberFile.fileType | File type of the viber message. |
body.viberFile.fileUrl | The Url of the of the viber message file. (recommended file size: 600KB for optimal delivery) |
ttl | Time range until message expires. TTL range in seconds: 30 - 86400 seconds. If it is not set, the default range is 14 days. TTL range in seconds for web clients: 300 - 86400 seconds. |
label | A generic label using for tagging the viber campaign. |
inboundUrl | The defined callback URL that will receive the inbound messages. Check here for details. |
applicationName | The name of the application that was used to send this Viber message. |
price | The cost of the Viber message. |
direction | The direction of the Viber message. |
originatingService | The service that sent this Viber message. |
Callback retry policy
When Routee POSTs back to your service, an HTTP 200 OK response must be returned within 2 seconds. If Routee doesn't receive a 200 OK response within 2 seconds will drop the connection and will try to POST again (up 12 retries for 24 hours max) with the following retry policy after the initial callback attempt:
1st retry: 30 sec
2nd retry: 1 minute
3rd retry: 2 minutes
4th retry: 5 minutes
5th retry: 10 minutes
6th retry: 15 minutes
7th retry: 30 minutes
8th retry: 1 hour
9th retry: 2 hours
10th retry: 4 hours
11th retry: 8 hours
12th retry: 24 hours
Whitelist IP for callback service
Whitelist all the IPs that resolve to the following domain:
callbacksallow.routee.net
in order to be able to receive callback requests from Routee
Updated about 2 years ago