![]() ![]() Bot const BotEvents = require ( ' viber-bot ' ). Call setWebhook(url) with your web server urlįirstly, let’s import and configure our bot: ' use strict ' const ViberBot = require ( ' viber-bot ' ).Add the bot as middleware to your server with bot.middleware().Configure your bot as described in the documentation below.Create a bot and use the authentication token from.Import viber-bot library to your project.middleware ()) įor more information see ViberBot.middleware(). If you are already using express or equivalent, you can do the following: app. Install with npm install viber-bot -save Express ![]() Read our blog post on how to test your bot locally. If you deploy on your own custom server, you’ll need a trusted (ca.pem) certificate, not self-signed. Webhook - Please use a server endpoint URL that supports HTTPS.Each request posted to Viber by the account will need to contain the token. Once your account is created your authentication token will appear in the account’s “edit info” screen (for admins only). Account authentication token - unique account identifier used to validate your account in all API requests.This account will automatically be set as the account administrator during the account creation process. An Active Viber account on a platform which supports bots (iOS/Android).This library is released under the terms of the Apache 2.0 license. Please note that Viber is not responsible for promoting your bot. Once you’ve created your bot you are welcome to share it with your Viber contacts or promote it outside Viber on your website or social media channels. Important note for bot developers: Viber’s bot platform is open and free for developers to create bots in our ecosystem. The library is available on GitHub as well as a package on npm. ![]() Use this library to develop a bot for the Viber platform. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |