How to create viber chatbot


Viber Chatbots

3 out of 4 customers

prefer to chat with a business when looking for answers to simple questions

Stay in touch with your customers

Open for business 24/7

Viber Chatbot pricing

You can create and publish your chatbot on Viber for free. Make your service available 24/7 
and provide automated replies to your customers with free session messages — or 
strike up a conversation with your subscribers, using chatbot-initiated messages.

Messages exchanged in a chatbot fall into two categories:

Chatbot session messages

Message exchanged between the chatbot and its subscribers during a conversational session.

All messages exchanged between the chatbot and its subscribers during a session are completely free.

Chatbot-initiated messages

Message sent by the chatbot owner to its subscriber to engage in a conversation with them.

Each Viber Chatbot receives 10,000 free chatbot-initiated messages per calendar month.

What’s a Chatbot session?

A 24-hour Chatbot session starts whenever a subscriber messages the chatbot. After 24 hours, the session terminates automatically. The next time a subscriber messages the chatbot, a new session starts.

How can I send more than 10,000 chatbot-initiated messages per month?

To send more than 10,000/month, you will need to set up billing for your Chatbot by signing Viber’s Chatbot Commercial Terms and providing a prepayment that will act as your account’s balance. Once the billing is set up, you will be able to exceed 10,000 messages limit. Viber will bill you for the billable traffic at the end of each month to maintain your positive balance in our system.

How much does a chatbot-initiated message cost?

The rate applied to each chatbot-initiated message depends on the phone number with which the subscriber you’re messaging is registered on Viber. 

How to start with a Viber chatbot

You can create a chatbot yourself — just follow these three easy steps below. Alternatively, speak with our Messaging Partners who can help you build your chatbot.

FREE

01. CREATE AN ACCOUNT

Visit the Viber Admin panel and provide key information: name and avatar, unique URL, category and subcategory, as well as general information about the chatbot. Receive your unique access key (token), which will enable you to connect your chatbot to our Viber API.

FREE

02. CONNECT THE CHATBOT TO THE PLATFORM

Configure the logic of the chatbot yourself using our Viber API guidelines or with the help of external developers. Use the token to connect the chatbot to the Viber API.

PAID

03. SEARCH, SHARE, PROMOTE

Once you have launched your chatbot, get in touch with the Viber team to make it searchable and verified for increased visibility. Take advantage of our advertising solutions to extend your reach to new segments.

Need assistance?

If you have questions or don't know where to start, drop us a message, and our team will get back to you.

Create your own Viber Chatbot in Minutes | by Mehfuz Hossain | Smartloop

There there is a new version of the blog post available, please read it here: https://blog.smartloop.ai/createviber-chatbot-in-minutes-b3d6ae175484

Builder Dashboard

Viber was founded in Israel in 2010 and today it has over 900 million users. According to sources it is ranked as #3 after Facebook and WhatsApp with a large user base, mostly in Europe and Asia.

In this post, I am going to show how to quickly create a Viber chatbot with dynamic data. I am creating a very simple weather bot that will pull data from openweather.org for a given city with the forecast.

First, create your free smartloop.ai account. Then create a Weather Bot by clicking the +Create New Bot button.

Once you hit “Submit”. Smartloop will do the following:

  1. Create a container specific to the subscription to run the bot.
  2. Create the basic blocks like (start, about, default) to give you an idea of the flow.
  3. Configure the underlying AI.

Now click on your weather bot to go into the build tab, you should see the following once everything is ready:

Next, I am going to use the built-in JSON API plugin. This is one of the core plugins that comes out of the box with our new chatbot builder. There is also a “Script Block” option to bring in your own custom logic to the conversation flow but that is a topic for another post, therefore, stay tuned! The JSON API plugin quickly lets you embed data from an external source. Think of it as POSTMAN.

There are a few different things that you can do with the plugin, including setting query string parameters, customer headers, and POST body. You can pass results to the conversation flow by setting a user variable as shown above.

Before, I dive more into details, first create the intent for the weather bot. Let’s call it “location” and configure it for a common weather question. Add “How is the weather in Paris?” in the Define Expression tab.

Highlight **Paris** as an entity and mark it as “location” this will give AI the pattern that will be used to resolve similar expressions. This part is commonly referred to as training.

Next step is to make a request to the weather API and pull the current forecast based on geo-location. Here I have to do the following:

  1. Use lat / lng from the resolved location entity. It is available as a variable for use from the conversation context.
  2. Make a request to the weather API with lat/lng from #1 to get the weather forecast and set it as a user variable to use in the next step.

The first step is to set the entity lat/lng as a query parameter.

Here, I have used {{nlp.entities.location}} to get the location object from resolved entities.

Check out the resources link below to find out more about context variables.

Tip: You can easily debug the context variables from within “Cloud Code” and you can access them throughout your conversation flow as a template variable by using *double braces* syntax.

Next, make a GET request to openweathermap.org API to retrieve the current forecast:

https://api.openweathermap.org/data/2.5/weather

Copy and paste the following Query string JSON to your JSON API plugin as shown above:

{
"lat": "{{nlp.entities.location.0.lat}}",
"lon": "{{nlp.entities.location.0.lng}}",
"appid": "APP_ID",
"units": "imperial"
}

Complete the step by replacing the APP_ID with yours from openweathermap.org and defining the {{result}} variable.

Configure the conversation UI by adding the following elements:

1. Add Text response for current weather:

Currently in {{nlp.entities.location.0.formatted}} it's {{result.main.temp}}°F.

3. Add Text response for the forecast:

Today's forecast: {{result.weather.0.description}} and with high of {{result.main.temp_max}}°F and a low of {{result.main.temp_min}}°F.

Lastly, test your bot making sure everything is working correctly:

Click on the publish icon from the left navigation bar and connect your bot. Follow the instructions in “Create a Bot” wizard to create a new Viber chatbot. Please refer to the viber developer documentation on how to create a bot account.

Go to your Viber desktop or mobile app and start chatting with the bot.

Weather Bot Demo

We would love to hear what bots you are creating in Viber. If you have feedback and want to share it with us then drop us a line at [email protected]. We would be glad to assist you.

Finally, if you liked reading the post, please share it and we always love to hear from you for feedback in improving the product and adding features that make you more productive. Also, don’t forget to check out the resources below and reach to [email protected] for more information.

Announcing Recime v2 ✌ Code-Free Chatbot Creation w/ New Customization Options

Hope this helps!

How to create a chatbot for Viber - Timeweb Community Knowledge Base

Let's talk about creating a simple Viber chatbot to send a message.

Terms and definitions

Viber Chatbot is a Viber program implemented through a public account with which the user can interact in order to achieve some goal.

Public accounts are specially created public accounts for communication and interaction with customers (including using chat bots). A special case of public accounts are public chats where a group of people communicates.

Viber link is a special link to open a contact, chatbot or other resource in the Viber app. Starts with a special viber:// prefix. For example: viber://pa?chatURI=hello2bot .

The community is now in Telegram

Subscribe and stay up to date with the latest IT news

Subscribe


Creating a chat bot

Let's create the simplest chat bot for Viber. Why the simplest? Because newbies usually have a lot of questions. Naturally, such a simple chatbot is needed to check that everything is working. Moreover, the functionality of a simple bot can be expanded further at your discretion.

Target: the bot will forward our message back.

In fact, a platform for hosting a chatbot is a regular web hosting. And the bot itself, in our case, is one PHP file.

If you want to deploy hosting yourself, then you can use the bundle: Apache + PHP + MySQL, but it is better to use the services of a hosting provider where everything you need is installed, for example, Timeweb.

Bot technology is simple:

  • We write a message to the chat, it goes to the Viber server.
  • Viber accesses our server (script) via an HTTP request.
  • Our server (script) provides a response to this, which goes back to the Viber server.
  • The answer comes to the chat.

And now the step-by-step creation process (of 13 steps):

1. Go to the development site. You must first have the Viber app installed on your smartphone.

2. Enter your phone number and log in.


3. Viber will send a confirmation code - enter it and click "Next".


4. Click the "Create a bot" button and fill in the required fields:

  • Account Image - upload a 400x400 image that will be displayed in the profile of the public account and as an icon in the messages.
  • Account Name is the name that will be displayed in the bot's header.
  • URI - come up with an identifier by which you can find the bot.
  • Category - Choose from 7 main categories.
  • Subcategory – select the subcategory in which your bot will function from the list.
  • Language - select the main language.
  • Account Description – describe the created bot in more detail.
  • Website Address - optionally enter the address of your site.
  • Email Address is the email address.
  • Location - location, location.


5.
Check the box to accept the agreement and click "Create".


6. You will then receive a Viber authentication token. Copy and save it.


7. Now download the template for the chatbot to your computer: github.com/the-lans/bots/tree/master/Viberbot

Direct link to download the entire archive: github.com/the-lans/bots/archive/master.zip

8. Unzip and open the files index . php and php from folder Viberbot .


9. Some parameters need to be changed in these files.

In file index.php you need to change:

  • AUTH_TOKEN to the token of your public Viber account.
  • HelloBot to the name of your bot, under which it will respond to you.


In file set_webhook.php you need to change:

  • AUTH_TOKEN to the token of your public Viber account.
  • WEBHOOK_URL to your webhook URL, i.e. The URL of the index.php file on your hosting.


10.
Viber requires an SSL certificate to be installed on your website. Such a certificate can be ordered both for a fee (for example, Sectigo Positive SSL) and for free (SSL Let's Encrypt). Learn more about SSL certificates in the Help Center.


11. When the SSL certificate becomes active, go to the Timeweb hosting panel through the file manager:

  • Go to your site.
  • Create a new folder for the bot.
  • Uploading two files.


12. Set up a webhook for our Viber bot. We go into the browser and run the file set _ webhook . php . If all is well, the following message is displayed (see below). If you are unable to install the webhook, carefully check the URL (case-sensitive) or the correctness of the PHP file.


13. Go to Viber on your smartphone. We successively press in the menu: More –> Public accounts –> HelloBot .

If the public account is hidden, click "Show".

Check result

In the public account, press the "Message" button and start interacting with the bot. We write any phrase, the bot should answer us in the same way. If the bot refuses to respond, check the correctness of the PHP file, the presence of an SSL certificate, etc.


We have successfully created and launched a chat bot for Viber. Now you can think about expanding its functionality. Documentation Viber REST API can be found on the official website of the messenger.

Here we looked at creating a bot in PHP. A Viber bot can also be created in Python and Node.JS.

How to make a bot for Viber. Step-by-step instructions for developers and customers - Social networks on vc.ru

Hello vc.ru! My name is Evgeny Borovkov and I am an entrepreneur. In this article, we will fully understand the issue of working with Viber for business. Chatbots, brand verification, mailing lists and life hacks. The whole experience of our work with the messenger.

5831 views

Wow what an ad Viber

Foreword

Despite the fact that there is only talk around about Telegram bots, web bots and cold mailings, I want to touch on the topic of developing a bot specifically for Viber. We periodically receive requests for the development of such bots, so I decided to save everyone time and sketch out a simple instruction for everyone who wants such a bot. Go!

Why Viber

Contrary to popular belief, Viber is not dead yet. Even on the territory of the Russian Federation. Yes, Telegram is gaining momentum and is very actively crowding out other messengers. But he has not yet succeeded in finally winning and taking the ALL audience for himself.

Viber is still used by people over 40. At least that was the case in 2021. I did not find statistics for 2022. I believe that Viber is used by people who:

  • often call to other countries or live in several countries. For example, citizens of Israel, where Viber is very popular. Arriving in the Russian Federation, they continue to sit in the messenger. At least in order to communicate with relatives at home.
  • For whom Telegram is too difficult, and WhatsApp does not have any of their friends. Yes, Durov focuses mainly on young people. And Zuckerberg to the metaverses. But let's not talk about sad things.
  • They sit there by inertia.

By the way, playing around and making cool bots for Viber, by analogy with Telegram, most likely will not work. Personally, I have not met such people. If you have found any, please share the links in the comments!

Whatever the reasons for using Viber, the audience of the messenger is huge. Why do we need this information? To make it easier to answer the question “why do I need a bot for Viber?”.

Well, Viber did not leave the Russian market. And he was not banned. Rakuten (the owner of Viber) even complied with the requirement to land in the Russian Federation. Link to news.

The first step in creating a bot for Viber

Before we sit down to write the code, we need this link: https://partners.viber.com/login . Without authorization in this very place, even a test bot on a test circuit will not start.

Using this link, we need to not only log in, but also fill in the fields: Account name (actually the name of the bot), URI (username of the bot), picture. The mechanism resembles BotFather in Telegram. But only a little more difficult, because you need to go to this web admin panel. But but there is a Russian language .

From sudden, you need to select a category, bot language and location. You can also specify the website address and email address. They will also be displayed in the bot's profile.

What is important to understand at this stage:

  • Confirmation sms come every other time. I do not know what it is connected with, but this situation has not changed for several years. If Viber representatives are reading this, it will be great to get a comment from you.
  • Our bot, in Viber terminology, is called “public account”. I suggest you just deal with it.

By the way, in addition to the authorization window in the admin panel, there is also such a page. It seems like it is designed to sell you the idea of ​​​​creating a bot in Viber.

Side note: Viber used to have a company verification process. There it was necessary to upload documents and wait a long time for a response. Often he did not come and it was impossible to influence this. Now, as I understand it, they have shifted the confirmation process onto the shoulders of the partners.

On this page, a list of all partners involved in the verification of companies. Why is this needed? Then, if you are a large brand, then you probably want your bot to be called and not look like anyhow, but be the official bot of the brand.

I think they took the step of creating these local partners because bot builders came along. Over the past few years, the chatbot market has transformed so much that customers no longer come directly to Rakuten. Now the client comes either to the agencies (which we have been for 4 years), or goes to the designer.

The technical side of creating a bot in Viber

Created an account, got to the step with a token - great! Now let's figure out how to write this very bot.

There are a lot of libraries for Python on the Internet, links to which I will not even attach. There, launching and testing the simplest bot will take literally five minutes (skillfully). You can easily find instructions for setting up web hooks on the same hub.

We have been writing (and still writing) bots in Java for 4 years. And so we have our own connector library for Viber. Who needs it - write to me either in private messages, or on our Telegram channel and I will send a link to it.

What are the subtleties at this stage:

  • When you have created a test bot, you need to log in to Viber on your phone, go to: “More → Public accounts” and you will see your bot. It will be hidden. Click on it and the "Show" button appears. From that moment on, it will become publicly available. No:
  • In order for the bot to be “Verified” and be available in the search, you need to contact the Viber team. They seem to be testing it somehow. Probably, as Facebook* (now Meta*) checked, it was still possible to make bots there. Although, in fact, Viber just made this step paid. The bot will work without payment. But you have to make a direct link to it and lead the user straight.
  • Bot needs hosting. This thesis is not obvious to those who have not previously touched bots, so I will talk about it. The developer can temporarily bring up the bot to test it on their PC, yes. But in order to run the bot on a permanent basis, you will need a server where the bot will constantly work. Often contractors can provide such a server. For example, we have such a service.

How to Create a Viber 9 Chatbot0003

Of course, I haven't forgotten yet, here is a link to the Viber API documentation.

In terms of features, Viber has a fairly wide functionality. You can make bots with buttons and inline buttons. With the very ones that are sorely lacking in WhatsApp (yes, somehow the buttons were brought in, but more on that later). I already have detailed instructions about bots for this messenger, so it's time to subscribe 🙂

Cold and warm messaging in Viber

As I wrote in the last article, Viber has the ability to do both cold and warm mailings. You can read it for yourself on this page.

With warm, everything is clear: upload your customer base, see what percentage of them have Viber installed and away you go. We set up all sorts of segments on our side, and load ready-made lists into the messenger.

And, by the way, there are brands that have created a chat bot and launched a mailing list. For example, a well-known jewelry brand, which is constantly closed, saddled this messenger fully and sends good targeted mailings with buttons and a quick and convenient opportunity to buy their goods.

With cold mailing, everything is a little more interesting:

Until the haters come running to put minuses, I will say that such mailing can be very useful. For example, to send checks. Yes, those cashier's checks. Many stores have already thought of not bothering with paperwork, but sending you a link to the check directly in the messenger. I consider this the most convenient feature, because I don’t like paper checks and I think that everyone should switch to EDI and other electronic interaction formats, getting rid of paper.

Viber cannot check where you got the database with these recipients from. Therefore, you can sort of send mailings to a cold database. But:

  • When you verify your account, a checkmark appears. Like, the brand is confirmed. If you “get bold” and send too many messages to those people who do not agree to this, you will easily catch a strike and Viber will take away both the tick and the possibility of mailing. Well, or the partner will select.
  • You still pay for each “dialog initiation”. Relatively speaking, each new conversation will cost money. But if the user answers there and you also answer something, then these answers will already be free. You can read it in full here.
  • All chats with brands are in a separate folder "Business Chats". Trying too hard to reach a wide audience will most likely not be as effective as the same SMS or WhatsApp mailings.

What else you need to understand when working with mailing:

  • Viber compares its tool primarily with SMS mailings. Like, we have 1000 characters here and only 70 in SMS. Yes, and you pay for delivered and not for sent messages.
  • This mechanics can be well tied up, for example, with CRM. A client came, bought, and you followed him with another message that he had a discount on his next purchase. Although this “plus” is true not only for Viber, but for chatbots in general. The same WhatsApp also “can do this”.
  • Not everyone really has Viber. If a brand wants to truly be present in messengers, then in addition to the usual Telegram bot, it must also work with the audience on WhatsApp, Viber and VK. A good example of building this kind of “omni-channel communication” is one big job search site with a red logo. Or a logistics company with a green logo.

UPD: On September 2, the conditions for chatbots were updated. Now outgoing messages, even for bots, will be paid. Except the first 10,000 per month. Link to news.


Learn more