fossasia/susi_viberbot

Name: susi_viberbot

Owner: FOSSASIA

Description: Viberbot for SUSI AI http://susi.ai

Created: 2017-04-14 09:10:20.0

Updated: 2018-05-23 17:26:26.0

Pushed: 2018-05-13 05:58:42.0

Homepage:

Size: 4628

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Getting Started : Viber Susi AI Bot Installation

It's easy for you to create your own Viber messenger bot and integrate susi's API into it. You can read the documentation on how to make a public account in Viber and get started.

Messenger bots uses a web server to process messages it receives or to figure out what messages to send.

Prerequisites

To create your account on -:

  1. Viber
  2. Github
  3. Heroku
Setup your own Messenger Bot
  1. Fork this repository.

  2. Request for a public account on Viber.

    Fill this form

    alt text

    Follow the instructions for verification as indicated by viber.

  3. After verification, create and setup the public account.

    Click Second button from top-right, to discover public accounts made by you.

    alt text

    Click blue button at bottom-right, to create a new one.

    alt text

    Click Join Now to start setting it up.

    alt text

    After filling the required details click Continue

    alt text

    Add more specific details.

    alt text

    Select Viber chat Api as your chat Solution.

    alt text

    Copy the public account key. (It will be in the area that is coloured gray).

    alt text

  4. Create a new heroku app here.

    This app will accept the requests from Viber and Susi api.

    alt text

  5. Create a config variable by switching to settings page of your app. The name of your config variable should be X_VIBER_AUTH_TOKEN and its value is the API key generated in step 3.

    alt text

  6. Change the url in set webhook request options that is on line 33 in index.js file to https://YOUR-HEROKU-APP-NAME.herokuapp.com enclosed in ' '. Commit and push the changes to this forked repository.

  7. Connect the heroku app to the forked repository.

    Connect the app to Github by selecting the name of this forked repository.

alt text

  1. Deploy on development branch. If you intend to contribute, it is recommended to Enable Automatic Deploys.

    Branch Deployment.

alt text

Successful Deployment.

alt text

  1. Now, visit the created heroku app from a browser, and check if the status message received for set Webhook request is - ok. That means the webhook is successfully set.

    This should be the output.

    alt text

  2. Go to the Viber public account created and click the symbol indicating 1-on-1 chat with Susi at your top right(second symbol).

    1-on-1 chat

alt text

  1. Enjoy chatting with Susi.

    alt text


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.