Public Account Documentation6.9.0

Docs / General / Public Account API Access

Public Account API Access – White Paper

Viber 6.5 introduced a new Public Account API, which third parties can use to send and receive messages between a Public Account (run by a company or service) and a Viber user.

Table of Contents

Using the Public Account API

Public Accounts contain two communications channels:

  1. Public Chats – Public communication channel from the Public Account visible to all of the Public Account’s followers. All information shared through this communications channel is publicly accessible by all the Public Account’s followers and open to free access via external API’s.
  2. Public Account API – Private encrypted communications channel between a Public Account and a subscribed Viber user. All information communicated over this channel can only be seen by the subscribed Viber user and the Public Account. It cannot be accessed by any 3rd party API.

When creating a new Public Account you will receive a Public Account token which is used for all communication with the Viber Back End.

In order to enable communication between the Viber Back End and the Public Account, the Public Account must call the set web hook request with the Public Account token providing the Public Account’s URL for receiving the web hook. There is also an optional parameter (v6.5.1 and up) to define which events it will receive (such as delivered and seen notifications when clients receive and read messages). Once the set web hook request is received by the Viber Back End, it will validate the URL and send a response.

Communication between Public Accounts and Viber users

All communication between Public Accounts and Viber users can only be initialized by the Viber user starting a new conversation or subscribing to the Public Account (opt–in) (in both cases the user will be subscribed to the Public Account). When a Viber user subscribes to the Public Account, the Public Account will receive the following information about the user:

Once a Viber user subscribes to the Public Account, the Public Account can send messages to the Viber user freely (not only in response to a message from the user). Viber users can unsubscribe at any time from the Public Account, which will immediately block any further communication from the Public Account to the user. All messages will include a unique message token and timestamp created by the Viber Back End and will be synchronized between all users’ devices. Messages sent to the Public Account will also include the user’s Viber name and avatar.

Security

Privacy

Successful delivery definition