mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2024-12-23 02:06:12 +02:00
2.0 KiB
2.0 KiB
id | sidebar_class_name |
---|---|
Viber | Viber |
<img src={require('../../static/img/APIs/Viber.png').default} width='64px' />
Viber
This section is dedicated to the library for working with Viber API. On this page, all the steps necessary to start working are described
Getting started
For Viber, there are two REST APIs: one for working with channels and the other for chatbots. In both cases, the main parameters are Token and UserID
-
If you need to manage a channel:
- Open the Viber app and create a new channel
- After creation, go to the channel settings -> For developers, and copy the Token
- Set webhook (see Set webhook)
- UserID - your ID (channel administrator). See Get Channel Information for details
-
If you need a chatbot:
- Go to the link https://partners.viber.com/account/create-bot-account and authorize yourself with your phone number linked to Viber
- Select the option to create a new bot
- In the bot creation menu, fill in all the required fields
- Copy the Token
- To find your new bot, you can scan the QR code on the creation page or in the settings (chat bots section) within the Viber app.
- You cannot start a conversation with the bot right now. First, you need to set up a webhook. See Set Webhook
- After launch, the User ID will be the ID of the specific person engaging with the bot. You can obtain it from processing incoming messages via Webhook
Important: The ID of the same user in chat and channel is different. You cannot use the ID obtained from a message to the bot to invoke channel management methods and vice versa