Chat
Viber
Looking for a way to send notifications via Viber? This step-by-step tutorial will show you how to integrate Viber’s API the easy way.
Viber Requirements
- A Viber bot account. Make a note of the auth token.
- An active webhooks server that can receive POST requests from Viber. Viber provides a nodejs utility for handling these requests.
- The recipient must have an active Viber account logged into either the iOS or Android app.
Webhooks Server
Before sending notifications Viber requires a webhooks server to be registered. This can be done using the following cURL command:
This webhooks server will receive events from Viber such as UserID’s of users who wish to subscribe, as well as notification delivery status events.
Sending a Direct Message
To send a direct message to a user, supply the Viber UserID
to the viber.receiver
property of the recipient profile. This UserID
is sent to the webhooks server after they send a message to the Viber bot.