Skip to main content

Viber as an inbound channel

Viber is a messenger application you can use to send messages, make video and voice calls over VoIP.

Do the following to use Viber as an inbound channel:

  1. Creating a bot
  2. Creating a channel
  3. Testing a bot

Creating a bot

You will need to register an account and to install the official Viber app on your smartphone.

Open the Partners Viber website and authenticate.

caution
You will get the confirmation code in your mobile app.

Click Create Bot Account in the dashboard. Do the following here:

  1. Upload the Account Image. This image will be displayed in the bot profile and as an icon in the Dialogs section.
  2. Fill out the fields. Please note that fields marked with a star are required.
  3. Read the agreement → click Create.

You will be issued an authentication token. It is a string of characters like 4a9a532197a7d267-1e8e559263524c09-d229ab2cb137d16b, and you need it to send messages to and receive them from the Viber server. Copy this token.

Creating a channel

Click Channels → Inbound → Connect channel on the control panel. Select Viber under Messengers and social networks.

Fill out the fields:

  • Name — specify a name for the channel or keep the default one.
  • Access token — specify your bot’s token you copied when you were creating your public account.
  • Sender name — specify the name to be displayed as the bot’s name in the dialog.
  • Branch — specify the project branch you want to deploy into the channel (master by default). You can also select a Git tag or enter a specific commit hash.
  • Deployment — select Automatic (whenever any change made to the project is saved) or Manual (using the Deploy button in the channel description line).
caution
You have to deploy a script before starting the bot. At this stage, the system builds the bot, checks the script syntax, and performs tests.

Click Create. Wait for a pop-up window with the deploy result to appear.

Testing a bot

Go to the bot dialog window in Viber and send a greeting/activation phrase according to your script. Then a dialog with your bot should start.