Viber
Required Variables
VIBER_STUDIO_FLOW_SID
(Guide)VIBER_AUTH_TOKEN
Setup
- Ensure you have installed and created a Viber account on your mobile phone
- Login to Viber Admin Panel
- Follow on-screen instructions to create a bot account
- Obtain the value for
VIBER_AUTH_TOKEN
which is underToken
info
Ensure that you have obtained all the necessary values for the variables stated in Required Variables
Configure Incoming Webhook
- Ensure you have deployed Conversations Adapters into your Twilio Flex account
- The Conversations Adapters incoming webhook URL should be in the format of
https://twilio-flex-conversations-adapters-<RANDOMNUMBER>-dev.twil.io/api/viber/incoming
- Using Postman App or cURL, send a request with the following to configure the webhook:
- URL:
https://chatapi.viber.com/pa/set_webhook
- Method:
POST
- Headers:
X-Viber-Auth-Token
with the value ofVIBER_AUTH_TOKEN
- Body (JSON):
{
"url": "https://twilio-flex-conversations-adapters-<RANDOMNUMBER>-dev.twil.io/api/viber/incoming",
"event_types": [
"message",
"delivered",
"seen",
"failed",
"subscribed",
"unsubscribed",
"conversation_started"
],
"send_name": true,
"send_photo": true
}
- URL:
Known Limitations
- Unable to verify Viber's webhook signature as Twilio Serverless Functions do not support BigInt (
message_token
attribute of the webhook payload)