Your token is generated and provided during the creation process. The account admin can find the token in the “edit info” page.
Tokens will not expire unless you request a new token from the Viber team.
Yes, but only in very specific circumstances. If you believe your token has been compromised you may request a new one from the Viber Support team.
When a webhook appears offline, Viber will retry the callback several times for an hour until the HTTP code
200 OK is received.
Each account can have only one webhook.
The same webhook can be used for more than one account.
If you are not receiving callbacks to your webhook, please check the following:
get_account_inforequest to try it.
seen) you may choose whether or not to receive them during the
The endpoint certificate authority should be on the Sun Java trusted root certificates list.
The user ID is available in all callbacks received from our server. Remember that a user must have subscribed to your account or sent you a message before you can message them.
The user ID is unique per user and per account. This means that the same user will have a different user ID for each account of your they message.
User IDs do not change or expire. Each user has a unique ID when they communicate with an account. The ID won’t change unless the user activates Viber with a different number (as this will be a new Viber account). Keep in mind that the same user will have a different ID for each account.
JSON for all API requests is
30kb. The keyboard can contain up to 12 rows in portrait mode. Learn more about Viber’s keyboard requirements here.
Most keyboard valuations take place on the client. If the request is successfully sent to the client and then fails one of the client validations you will receive a failed callback. The flow in this case is as follows:
0is received to indicate a successful request.
Failedcallback is sent to the webhook, containing the unique message token and a string explaining the failure.
Viber will always display the last keyboard sent to the user.
Bots are Viber’s solution for partner brands and organizations to interact with users through Viber.
Read more about how to create a bot here.
Before you publish your bot, you must be able to demonstrate that it meets our requirements. Please check that your bot contains the following.
Messages are sent to users based on user ID rather than phone number.
Messages are sent to users based on their user ID when they perform an action which triggers a callback.
Unique user IDs are created as a combination of user and account, so the same user may have more than one ID if they are contacting more than one of your accounts.