Viberex v0.2.1 Viberex View Source

Provides access to Viber REST API.

Reference

https://viber.github.io/docs/api/rest-bot-api

Link to this section Summary

Functions

The broadcast_message API allows accounts to send messages to multiple Viber users who subscribe to the account

Get public account details

The get_online request will fetch the online status of a given subscribed account members

The get_user_details request will fetch the details of a specific Viber user based on his unique user ID

The post API allows the Public Account owner to post a message in the Public Account’s public chat

Sending message to users who subscribe to the public account

Setting webhook for receiving callbacks and user messages from Viber. Removing the webhook is done by calling with an empty string

Link to this section Functions

Link to this function broadcast_message(message) View Source
broadcast_message(message :: map()) :: {:ok, map()} | {:error, any()}

The broadcast_message API allows accounts to send messages to multiple Viber users who subscribe to the account

Link to this function get_account_info() View Source
get_account_info() :: {:ok, map()} | {:error, any()}

Get public account details

Link to this function get_online(user_ids) View Source
get_online(user_ids :: List.t()) :: {:ok, map()} | {:error, any()}

The get_online request will fetch the online status of a given subscribed account members

Link to this function get_user_details(user_id) View Source
get_user_details(user_id :: String.t()) :: {:ok, map()} | {:error, any()}

The get_user_details request will fetch the details of a specific Viber user based on his unique user ID.

Link to this function post(message) View Source
post(message :: map()) :: {:ok, map()} | {:error, any()}

The post API allows the Public Account owner to post a message in the Public Account’s public chat.

Link to this function send_message(message) View Source
send_message(message :: map()) :: {:ok, map()} | {:error, any()}

Sending message to users who subscribe to the public account

Link to this function set_webhook(url) View Source
set_webhook(url :: String.t()) :: {:ok, map()} | {:error, any()}

Setting webhook for receiving callbacks and user messages from Viber. Removing the webhook is done by calling with an empty string.