Developer Docs

Table of contents

Get Viber status

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}

Request parameters

ParameterRequiredTypeDescription 
idYesintegerMessage 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}

Request parameters

ParameterRequiredTypeDescription 
referenceYesintegerExternal message ID. String up to 32 characters containing /a-zA-Z0-9/.

Response parameters

ParameterTypeDescription
msisdnstringThe phone number to which the message was sent.
referencestringExternal message ID.
time_indatetimeDate and time the message was created.
time_sentdatetimeScheduled date and time of the message sending.
time_drdatetimeDate and time the message was delivered.
statusstringCurrent Viber message status.
total pricefloatTotal cost of the Viber campaign.
currencystringCurrency of the user account, in which the cost of sending Viber is specified.
alt_routeSpecified if the Viber message was forwarded (cascaded) via SMS
channelstringChannel to send the message.
idstringThe unique message ID.
statusstringMessage status.
pricefloatMessage 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"
    }
}