Skip to main content

๐Ÿ’ฌ Viber

PulseHub connects to Viber via the Viber REST API, using a Viber Public Account or Viber Bot.


Prerequisitesโ€‹

A Viber Partners account at partners.viber.com.


Setup Stepsโ€‹

1. Create a Viber Bot/Public Accountโ€‹

  1. Go to partners.viber.com
  2. Log in with your Viber account
  3. Click Create Bot Account
  4. Fill in the bot name, description, and category
  5. After creation, you receive an Auth Token

2. Add the Channel in PulseHubโ€‹

  1. Go to Channels โ†’ Add Channel
  2. Select Viber
  3. Enter the Auth Token and Bot Name
  4. Click Save Channel
  5. Copy the Webhook URL

3. Register the Webhookโ€‹

Option A โ€” Using an online tool (no terminal needed): Use any free online REST client (e.g. Reqbin, Hoppscotch, or Postman web) and send a POST request:

  • URL: https://chatapi.viber.com/pa/set_webhook
  • Header: Content-Type: application/json
  • Body:
{
"auth_token": "YOUR_VIBER_AUTH_TOKEN",
"url": "https://yourdomain.com/webhooks/viber/YOUR_CHANNEL_ID",
"event_types": ["message", "subscribed", "unsubscribed", "conversation_started"]
}

Option B โ€” Using terminal (VPS):

curl -X POST https://chatapi.viber.com/pa/set_webhook \
-H "Content-Type: application/json" \
-d '{
"auth_token": "YOUR_VIBER_AUTH_TOKEN",
"url": "https://yourdomain.com/webhooks/viber/YOUR_CHANNEL_ID",
"event_types": ["message", "subscribed", "unsubscribed", "conversation_started"]
}'

4. Testโ€‹

Open your Viber bot in the app and send a message. It should appear in PulseHub within seconds.


Signature Verificationโ€‹

Viber signs every webhook with X-Viber-Content-Signature using HMAC-SHA256 with your Auth Token.