Skip to main content

Common Errors

This documentation provides an overview of the common error codes that may be
returned by the API. Each error code is accompanied by a name and description to help
understand the nature of the error, as well as an explanation of what caused the error and
how to resolve it. This information is intended to help clients quickly diagnose and resolve
any issues that may arise when making requests to the API. If you encounter an error code
that is not listed here, or if you need further assistance, please don't hesitate to contact
the support team for help.

Invalid URL

code: 1
The webhook URL provided is invalid.

Explanation

This error occurs when the client provides an invalid URL as the webhook endpoint.
The URL must be a valid, reachable URL that the server can send HTTP requests to. The client
should check the URL and ensure that it is correct. If the problem persists, the client
should contact the support team for assistance

Invalid Auth Token

code: 2
The authentication token provided is not valid.

Explanation

This error occurs when the client provides an invalid authentication token. The
authentication token is used to authenticate the client and authorize access to the API.
The client should check their authentication token and ensure that it is correct. If the
problem persists, the client should contact the support team for assistance.

Bad Data

code: 3
There is an error in the request scheme or data, such as a missing comma, bracket, or
other structural element.

Explanation

This error occurs when the client sends a request with a malformed data structure. The
request must be properly formatted and include all required elements. The client should
check the format of the request data and ensure that all required elements are present. If
the problem persists, the client should contact the support team for assistance.

Missing Data

code: 4
Some mandatory fields are missing in the request body.

Explanation

This error occurs when the client sends a request that is missing required data fields. The
request must include all required fields in order for the server to process the request
properly. The client should check the request data and ensure that all required fields are
included. If the problem persists, the client should contact the support team for
assistanc

Reciever Not Registered

code: 5
The reciver is not a Viber user

Explanation

This error occurs when the client sends a message to a phone number that belongs to
someone who is not a Viber user. The receiver must be a registered Viber user in order to
receive messages. The client should check the receiver's Viber registration status and
ensure that they are a registered Viber user. If the problem persists, the client should
contact the support team for assistance.

Reciever Not Subscribed

code: 6
The receiver is not subscribed to the bot.

Explanation

This error occurs when the client attempts to send a message to a Viber user who is not
subscribed to the bot. The receiver must be subscribed to the bot in order to receive
messages from it. The client should check the receiver's subscription status and ensure
that they are subscribed to the bot. If the problem persists, the
client should contact the support team for assistance.

Public Accout Blocked

code: 7
The bot account has been blocked.

Explanation

This error occurs when the bot's public account has been blocked. A blocked public
account cannot send messages or perform other actions on the Viber platform. The client
should contact the Viber support team to inquire about the status of the bot account and
resolve any issues that may have led to the block. If the problem persists, the client should
contact the support team for assistance.

Public Accout Not Found

code: 8
The bot account associated with the provided token was not found.

Explanation

This error occurs when the client attempts to access a bot account that is not found on
the Viber platform. The bot account must exist and be properly configured in order for the
client to access it. The client should check the provided token and ensure that it is
correct. If the problem persists, the client should contact the support team for assistance.

Public Account Suspended

code: 9
The bot account has been suspended.

Explanation

This error occurs when the bot's public account has been suspended by Viber. A
suspended public account cannot send messages or perform other actions on the Viber
platform. The client should contact the Viber support team to inquire about the status of
the bot account and resolve any issues that may have led to the suspension. If the
problem persists, the client should contact the support team for assistance.

Webhook Not Set

code: 10
No webhook has been set for the bot.

Explanation

This error occurs when the bot does not have a webhook set. A webhook is a URL that the
Viber platform uses to send messages and other updates to the bot. The client should set
a webhook URL for the bot in order to receive updates and messages. If the problem
persists, the client should contact the support team for assistance.

Reciever No Sutiable Device

code: 11
The receiver's device or Viber version does not support bots.

Explanation

This error occurs when the client attempts to send a message to a Viber user who is using a device or Viber version that does not support bots. The receiver's device or Viber version must be compatible with the Viber bot platform in order to receive messages from the bot. The client should check the receiver's device and Viber version and ensure that they are compatible with the Viber bot platform. If the problem persists, the client should contact the support team for assistance.

Too Many Requests

code: 12
The client has exceeded the rate limit for the bot.

Explanation

This error occurs when the bot has exceeded the maximum number of messages that can
be sent in a given time period. The Viber platform has rate limiting in place to prevent bots
from sending an excessive amount of messages and impacting the performance of the
platform. The client should reduce the number of messages sent by the bot and ensure
that they are in compliance with the Viber platform's rate limiting policies. If the problem
persists, the client should contact the support team for assistance.

API Version Not Supported

code: 13
The client tried to send a message with a minApiVersion that is larger than the
receiver's supported API version.

Explanation

This error occurs when the client tries to send a message to a Viber user who is using an
older version of the Viber API. The client has specified a minimum API version that is
larger than the receiver's supported API version, which means that the message cannot
be delivered. To avoid this error, the client should ensure that the minApiVersion
specified in the API request is equal to or lower than the API version supported by the
receiver. If the problem persists, the client should contact the support team for
assistance.

Incompatible With Version

code: 14
The message contains features that are not supported by the declared minApiVersion.

Explanation

This error occurs when a client sends a message that contains features that are not
supported by the current Viber API version. If the minApiVersion is set too low, the
message may contain features that are not supported by the Viber API, resulting in this
error. To resolve this issue, the client should ensure that the minApiVersion is set to the
minimum version required to support the features included in the message. The client
should also make sure that the Viber API supports the required version of the API.

Public Account Not Authorized

code: 15
The bot has not been authorized.

Explanation

This error occurs when the bot has not been authorized by the Viber platform to send
messages or perform other actions. The client should ensure that the bot's public account
has been properly registered and authorized by the Viber platform. If the problem
persists, the client should contact the support team for assistance.

In Chat Message Not Allowed

code: 16
Inline messages are not allowed.

Explanation

This error occurs when the client tries to send an inline message, which is not supported
by the Viber platform. Inline messages are messages that appear in the chat alongside
regular messages, rather than as separate messages. The Viber platform does not
support inline messages, and any attempts to send them will result in this error. The client
should avoid sending inline messages and instead send regular messages. If the problem
persists, the client should contact the support team for assistance.

Public Account Is Not Inline

code: 17
The bot is not an inline bot.

Explanation

This error occurs when the client tries to use the bot as an inline bot, which is not
supported by the bot's account type. Inline bots are bots that can be summoned in the
middle of a conversation, whereas regular bots must be manually started by the user. The
bot associated with the provided token is not set up as an inline bot and cannot be used in
this manner. The client should ensure that they are using the correct type of bot for their
needs and that they are using the bot in a manner that is supported by the Viber platform.
If the problem persists, the client should contact the support team for assistance.

Cannot Send Broadcast

code: 19
The broadcast message failed to be sent.

Explanation

This error occurs when the bot is unable to send a broadcast message to multiple
recipients at once. A broadcast message is a message that is sent to multiple recipients
simultaneously. This type of message is useful for sending important updates or
announcements to a large group of users. If the bot encounters an error while trying to
send a broadcast message, it may be due to a number of technical issues such as network
connectivity or server errors. The client should contact the support team for assistance in
resolving the issue.

Brodcast Not Allowed

code: 20
The bot is not authorized to send broadcast messages.

Explanation

This error occurs when the bot attempts to send a broadcast message, but does not have
the proper authorization to do so. Broadcast messages are messages that are sent to
multiple recipients simultaneously. To send a broadcast message, the bot must be
authorized by the Viber platform to do so. If the bot encounters this error, it means that
the authorization has not been granted, and the bot will be unable to send broadcast
messages. The client should contact the support team for assistance in resolving the
issue. The client should also ensure that the bot has been properly configured to send
broadcast messages by the Viber platform.

Unsupported Country

code: 21
The message sent is not supported in the destination country.

Explanation

This error occurs when a client tries to send a message to a country that is not supported
by the Viber API. Some countries may have restrictions or regulations that prevent certain
types of messages from being sent. In such cases, the Viber API will return this error. To
resolve this issue, the client should ensure that the message is compliant with the
regulations of the country where it is being sent, and that the Viber API supports sending
messages to that country.

Payment Unsupported

code: 22
The bot does not support payment messages.

Explanation

This error occurs when a client tries to send a payment message through the Viber API
and the bot associated with the provided token does not support payment messages. In
order to send payment messages, the bot must have the required infrastructure and
integration with a payment provider. If the bot does not support payment messages, the
Viber API will return this error. To resolve this issue, the client should either use a different
bot that supports payment messages or implement the necessary infrastructure to
support payment messages.

Reference

For more information on sending payment messages through the Viber API, please refer to
the Payment API section of the documentation.

Free Messages Exceeded

code: 23
The non-billable bot has reached the monthly threshold of free out of session messages.

Explanation

This error occurs when a non-billable bot has exceeded the monthly threshold of free out
of session messages that it is allowed to send. Viber sets limits on the number of
messages that non-billable bots can send in order to prevent spam and abuse. If the bot
has reached this limit, the Viber API will return this error. To resolve this issue, the client
can either switch to a billable bot or wait until the next billing cycle starts to send more
messages.

No Balance

code: 24
The billable bot has reached its monthly threshold of free out of session messages and
there is no balance remaining.

Explanation

This error occurs when a billable bot has reached its monthly threshold for free out of
session messages, but does not have any remaining balance. As a result, the bot is unable
to send any additional messages. To resolve this issue, the client should either add funds
to the bot's account or switch to a non-billable bot that has a monthly threshold for free
out of session messages.

General Error

code: other
An unknown error has occurred

Explanation

This error occurs when an unexpected issue arises that is not covered by any of the
previously listed error codes. This could be due to various reasons such as an issue with
the Viber API, a problem with the client request, or a technical issue with the bot. In this
case, it is recommended to check the request details and try again or to reach out to Viber
support for further assistance in resolving the issue.