Skip to main content

Prerequisites

Setup

Open the in Courier, enter your auth token and sender name, then save.

Webhooks server

Viber requires a registered webhooks server before you send notifications:
The server receives Viber events: the UserIDs of users who subscribe, and delivery status events.

Profile requirements

Viber addresses the recipient by UserID, which goes in viber.receiver on the profile. Store it once with , which merges into the profile and creates it if it does not exist:
The recipient needs an active Viber account. Viber sends the UserID to your webhooks server after a user messages the Viber bot. Then send to user_id and Courier resolves the address. For a one-off with no stored profile, pass it inline instead: "to": { "viber": { "receiver": "12943673==" } }.

Send by user id

The call in every language, and the rest of the profile object.

Send to a recipient

Courier reads viber off the saved profile, so preferences apply and the value can change without touching this code.

Overrides

covers the two levels and which one wins. A provider override changes the request body Courier sends to Viber, or swaps the auth token, sender name, and API URL.

Body overrides

Override the request body that Courier sends to the Viber Send Message API.

Config overrides

You can swap the auth token, sender name, or API URL at send time:

Provider details

Courier recommends routing to the channel. Naming this key in routing.channels instead is supported, and sends through just this provider.

Send to a specific provider

When that is worth doing, and what you give up: failover, channel priority, and providers you add later.