goodguymate avatar

Viber REST API Docs | Summary

goodguymate

Published: 25 Apr 2019 › Updated: 25 Apr 2019Viber REST API Docs | Summary

Viber REST API Docs | Summary

image.png

As you might now I have just started working at a chatbot developer company and as preparation besides many other things I was reading through Viber's REST API documentation. I made some notes for myself and then I realized I could share them with you, maybe for some people it could be quite useful to have a summary.

Getting started

To be able to implement the API you need the followings:

  • Active Viber Account
  • Active Public account/ bot --> you can register one here
  • Authentication key retrieved from your Public Account
  • Account webhook

Example for Authentication key, which should be included in the HTTP Header of the requests:
X-Viber-Auth-Token: 445da6az1s345z78-dazcczb2542zv51a-e0vc5fva17480im9

Setting a webhook

image.png

Basic Text Message Example

image.png

Possible message types

  • Picture
  • Video
  • File
  • Contact
  • Location (latitude, longitude)
  • Url
  • Sticker
  • Carousel → side-scrollable multi-option panel
  • Keyboard → multi-choice answer possibility

Broadcast message

Broadcast message allows you to send message to multiple receivers up to 300 people.
Change the key “receiver” to “broadcast_list” in the JSON:

image.png

Other basic API features

  • Get user details
  • Check if the user is online
  • Post to public chat

Callbacks:

  • Subscribe
  • Unsubscribe
  • Conversation started → response can be a welcome message
  • Status (delivered/seen/failed)

Receive message from user

image.png

This was a brief summary of the API, I just wanted to list the key features and give some code examples. The whole, detailed description can be reached here:
http://developers.viber.com/docs/api/rest-bot-api/

Thanks for passing by!

Follow Upvote Resteem @goodguymate



Steem Gaming Community
ya6cczq3qa.png
OP Gaming

<I suggest Partiko if you are browsing from Android/iOS and would like to earn extra $>

Leave Viber REST API Docs | Summary to:

Written by

Gamer | Programmer | Homo sapiens sapiens

Read more #programming posts


Best Posts From goodguymate

We have not curated any of goodguymate's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From goodguymate