Nothing found

Viber channel – promotional

The Viber channel object for Advanced promotional. It goes into the channel object under the viber key - see Cascade.

Important

Transactional messages use a different Viber object under the same key - it carries approved templates instead of a button and an image. See Viber – transactional.

{ "viber": { "sender": "BulkGate", "image": "https://example.com/banner.jpg", "button": { "caption": "Open the offer", "url": "https://example.com/offer" } } }

Viber object

PARAMETER NAME VALUE MANDATORY DEFAULT VALUE
text Text of the Viber message. Overrides the top-level text, see Which text is used No null
sender Registered Viber sender. Needs to be registered first. For registration contact support here Yes -
expiration Time limit in seconds after which the next channel in the cascade is used. Values below 60 are ignored and replaced by the default No 300
button Structure that creates a button in the message, see Button object. Without it the message has no button No null
image Url to an image shown in the message No null

Button object

PARAMETER NAME VALUE MANDATORY DEFAULT VALUE
caption Button text No OK
url URL address No #

The defaults apply only when the button object itself is present - "button": {} produces a button captioned OK pointing to #.

Example of full request

Viber with an image and a button, SMS as the fallback. The SMS leg has no image or button, so it falls back to the top-level text.

POST /api/2.0/advanced/promotional HTTP/1.1 Host: portal.bulkgate.com Content-Type: application/json { "application_id": 451, "application_token": "NKN02TWE6NfBkfl-your-secret-token-Wf05GaqLIWLW4aBj", "number": ["420777777777", "420777777778"], "text": "Spring sale starts today, up to 50 % off.", "channel": { "viber": { "sender": "BulkGate", "image": "https://example.com/spring-sale.jpg", "button": { "caption": "Open the offer", "url": "https://example.com/spring-sale" } }, "sms": { "sender_id": "gText", "sender_id_value": "BulkGate" } } }

The response is the same for every channel - see Advanced promotional.

Was this page helpful?