Developer Docs
The method allows obtaining information about the status of a Viber message sent by the user via the API.
To get Viber status, make a request to this URL:
GET https://api.bsg.world/rest/viber/{id} |
Parameter | Required | Type | Description |
id | Yes | integer | Message ID – a unique random identifier that is generated by the BSG platform. The entry id is passed in the /viber/create method. |
or use alternative request:
GET https://api.bsg.world/rest/viber/reference/{reference} |
Parameter | Required | Type | Description |
reference | Yes | integer | External message ID. String up to 32 characters containing /a-zA-Z0-9/. |
Parameter | Type | Description | |
msisdn | string | The phone number to which the message was sent. | |
reference | string | External message ID. | |
time_in | datetime | Date and time the message was created. | |
time_sent | datetime | Scheduled date and time of the message sending. | |
time_dr | datetime | Date and time the message was delivered. | |
status | string | Current Viber message status. | |
total price | float | Total cost of the Viber campaign. | |
currency | string | Currency of the user account, in which the cost of sending Viber is specified. | |
alt_route | Specified if the Viber message was forwarded (cascaded) via SMS | ||
channel | string | Channel to send the message. | |
id | string | The unique message ID. | |
status | string | Message status. | |
price | float | Message cost. |
If request is successful, you will receive a response:
{
"error": "0",
"msisdn": "85267202829",
"reference": "12erdgm9",
"time_in": "2016-01-01 00:00:01",
"time_sent": "2016-01-01 00:00:02",
"time_dr": "2016-01-01 00:01:01",
"status": "read",
"price": "0.02",
"currency": "EUR"
"alt_route": [
{
"channel": "sms",
"id": "string",
"status": "scheduled",
"price": "string"
}
}