For more details on sending Viber messages, please refer to a dedicated section on our Helpdesk. The process of sending Viber messages via the Rest API is also outlined below.
Endpoint: PUT (POST) https://app.bsg.hk/rest/viber/create
{
"messages":[
{
"to":[
{
"msisdn":"380972920000",
"reference":"ext_id_19"
}
],
"text":"My Viber messages is shinier than your SMS messages",
"alpha_name":"BSG",
"is_promotional":false,
"options":{
"viber":{
"img":"http://mysite.com/logo.png",
"caption":"See Details",
"action":"http://mysite.com/"
}
}
}
]
}
Response:
{ "result":[
{
"error":0,
"errorDescription":"No errors",
"reference":"ext_id_19",
"id":"217",
"price":0.23,
"currency":"EUR"
}
],
"currency":"EUR",
"total_price":0.23
}
In case of an error, you will receive the following response:
{ "result":[
{
"error":43,
"errorDescription":"External ID already exists",
"reference":"ext_id_19"
}
]
}
Comments
0 comments
Article is closed for comments.