For the best experience turn off the battery saving mode.

Welcome to the
BSG Developer Docs.

Whether you're looking to use our REST APIs, receive
notifications with webhooks, or build an app for the
Intercom Messenger, you've come to the right place.

Send a VIBER message

Creates a new message object. BSG returns the created message object with each request. Per request, a max of 50 phones can be entered.

REQUIRED PARAMETERS

Parameter
Type
Description
messages
type: array

The array of VIBER message objects.

to
type: array

The array of recipients msisdn's & reference's.

msisdn
type: string

The telephone number.

text
type: string

The body of the VIBER message.

alpha_name
type: string

The sender of the message.

OPTIONAL PARAMETERS

Parameter
Type
Description
validity
type: int

The amount of seconds that the message is valid.

tariff
type: int

Tariff code of a price grid.

reference
type: string

A client reference.

options
type: hash

An hash with VIBER options.

DEFINITION

PUT (POST) https://app.bsg.hk/rest/viber/create

RETURNS
Returns a message object if the request was successful. If the request failed, an error object will be returned.

EXAMPLE REQUEST

{ „tariff“:“0″,
„validity“:“1″,
„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/“
}
}
}
]
}

EXAMPLE 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 ERROR CASE

{ „result“:[
{
„error“:43,
„errorDescription“:“External ID already exists“,
„reference“:“ext_id_19″
}
]
}

Rate this post