1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2024-12-16 11:38:11 +02:00
OpenIntegrations/docs/en/md/Instructions/Viber.md
2024-06-21 06:43:00 +00:00

2.3 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

:::warning Starting from February 5, 2024, this method of creating bots is no longer valid: Rakuten has canceled the ability to create bots for free, and now working with the API requires verification under a commercial model. More details here :::

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:

    1. Open the Viber app and create a new channel

    BF

    1. After creation, go to the channel settings -> For developers, and copy the Token

    BF

    1. Set webhook (see Set webhook)
    2. UserID - your ID (channel administrator). See Get Channel Information for details

  • If you need a chatbot:

    1. Go to the link https://partners.viber.com/account/create-bot-account and authorize yourself with your phone number linked to Viber

    BF

    1. Select the option to create a new bot

    BF

    1. In the bot creation menu, fill in all the required fields

    BF

    1. Copy the Token

    BF

    1. 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.

    BF

    1. You cannot start a conversation with the bot right now. First, you need to set up a webhook. See Set Webhook
    2. 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