0% found this document useful (0 votes)
46 views

Sevice Messages API Tech Document V9.0

Uploaded by

giang.bluegroup
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

Sevice Messages API Tech Document V9.0

Uploaded by

giang.bluegroup
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Business Messages

API Documentation

Version 9.0
Sep 2020

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and
company private information. no personal or identifying info on document)
Table of Contents
Table of Contents 2

Introduction 4

Onboarding 4

Product Overview 5
User Interface 5
Chats Screen 5
Business Inbox 5
Business Chat Screen 6

API Reference 10
Getting Started 10
Architecture 11
General Validations 12
send_message request 12
General Request Parameters 13
Message types 15
Transactional Messages 15
Promotional Message Types 16
Sessions 18
File Transfer 19
Templates 20
Responses 21
Response Parameters 21
Error Codes 22
Message Status Callback 23
Delivered status 23
Seen status 23
Expired status 24
Subscribe 24
Unsubscribe 24
URL Schemes 25
Emojis 25

Billing 26
Minimum Fee 26
Labels vs Types 26
Open Destinations 26
TTL 26
Multiple Delivered Statuses 26

API Security 27

Business Messages Portal 27

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and company
private information. no personal or identifying info on document)
Introduction
Viber’s Business Messages API allows you to send verified transactional and promotional
messages to users from your business account. Using a unique token for each message, you can
track its movement from the moment your team hits ‘send’, until the end-user sees it.

The following documentation demonstrates how to implement the API into your platform, as
well its main features.

Onboarding
The Business Messages API is available for selected companies, who have been reviewed and
approved by Viber. To see if you qualify and to discuss this business opportunity further, please
contact us: ​[email protected]

Already integrated?
For technical questions: ​[email protected]

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and company
private information. no personal or identifying info on document)
Product Overview
User Interface
Chats Screen
After you successfully complete the onboarding
process, and you send the first message to a user
- a new chat will open on the user’s main chats
screen. The business chat, as opposed to regular
user chats, will display ​Viber’s verified icon​ next
to its name. This will allow users to easily identify
and understand that this is a verified business
account within their regular chat screen.
Once a business chat exists in the user’s chats
screen they will be able to find it like any other
chat using the search box.

Business Inbox
To accommodate the large number of businesses that are using Viber to communicate with
their users we have introduced the Business Chats inbox.

Currently only available in Russia, this inbox separates verified Business Messages from a user’s
regular chat screen. This feature has made it easier for users to find their business chats and for
Business Messages to not get lost in a user’s chat inbox.

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and company
private information. no personal or identifying info on document)
Business Chat Screen

Account Types
You can choose from two different account types to send business messages:

1way Chat 2way Chat

The 1way chat allows only you to send The 2way chat allows the user to respond
messages to your subscribers and restricts to your messages as well as gives them the
them from replying back. This is a great option to initiate the conversation. For
option if you intend to only send example, you can send a question to the
transactional and promotional messages user and give them the opportunity to
which do not require a response from the respond back to you.
user. Unless deleted, the user will be able
to see all communication from your
account in a single chat thread.

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and company
private information. no personal or identifying info on document)
Business Logo
During onboarding, we will ask you to submit 5 logos that will be used in various locations of
your business account. After the initial setup, you will be able to update and adjust the logos as
needed.

Logo Requirements (mandatory):


1. Dimensions
● 50 x 50
● 65 x 65
● 100 x 100
● 130 x 130
● 360 x 280 (banner for the business info page)
2. PNG format only
3. Not over 150KB (each)

Business Messages Overlay


Upon the first interaction with your business account
an overlay will appear on the subscriber’s chat
screen. The overlay will allow them to learn more
about your business (opens the business info page)
and will also give them the option to stop receiving
messages from your account. The user will continue
to see the overlay until they exit out of it.

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and company
private information. no personal or identifying info on document)
Business Info Page
The business info page is your opportunity to tell Viber users about your business. This page can
be accessed by tapping on the information button at the upper right hand corner of the
screen, when a chat with your business account is open.

A subscriber will see the following details on your business info page:
● Logo – Must be your business’ official logo.
● Company Name – The sender name that will appear for the subscriber. Each sender name
can contain up to 25 characters.
● About – A short description of your business and its services. This is a mandatory field and
supports all languages. The minimum length of text is 10 characters and the maximum is
400.
● Address – Your business location.
● Phone number – Your business phone number.
● URL – Your business website​*
● Receive messages toggle – A user can choose to receive messages from your business
account, or block you, at any time.
● Learn more – Redirects the user to a support page with information on business messages.

Default Info Page​** Detailed Info Page

*​Facebook/ Instagram pages cannot be used as a business's URL.


**​Businesses created before the introduction of the info page appear with a default view

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and company
private information. no personal or identifying info on document)
Message Types
The Business Messages API allows for a variety of messages to be used to communicate with
your subscribers. The following are examples of the types of messages that you can send:

Text Only Text & Action Button

Image Only Text, Image & Action Button

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and company
private information. no personal or identifying info on document)
API Reference
Viber’s Business Messages API offers a series of features and tools that will allow you to reach
your audience in the most efficient way.

Getting Started
In order to integrate with our API, you will need to be set up on Viber’s servers as part of the
onboarding process. As part of the registration you will be required to provide the following
details:

1. The ​official company name​ that you would like to appear on your monthly billing
reports and on our billing system.
2. A ​list of countries​ (up to 20 per sender ID) that you would like to have open for your
test accounts. You will not be able to send messages to account holders living outside of
these countries.
3. All ​authorized IP addresses​ that will be used by you and your team to post requests to
Viber’s servers. Please note that we are only able to whitelist IP addresses as singles, a
range of IPs will not be considered valid.
4. The ​Callback URL​ that you will be using to receive message status callbacks from Viber’s
servers.
5. The ​Message URL​ that you will be using to receive user replies on accounts that are set
as 2way.
6. 5 logos - for more details see the ​Business Logo section​.

Upon receiving the above, we will begin the integration process. You will receive access to your
test business account shortly afterwards.

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and company
private information. no personal or identifying info on document)
A​rchitecture
Each sent message from a business account will go through multiple systems before being
delivered and billed.
The following illustrates the 'life cycle' of each sent message:
1. The message is sent by your system using an API request.
2. The message reaches our backend, confirming the structure of the request is intact.
3. Each sent message that reaches our server will be in line to be sent to the end user. When
there are more messages sent at once than our server can receive, each of these messages
will be held in a queue until our retry mechanism will be able to send it. ​Our server’s
maximum capacity is around 2,000 messages per second from every business account.
4. The message goes to Viber’s billing system to be validated.
5. Upon billing validation, the message will be sent to the end user.
6. Once the message is received by the end user a “delivered status” callback will be sent back
to be registered on the billing system and will also be provided as a callback over the API.

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and company
private information. no personal or identifying info on document)
General Validations

The following validation process runs in our backend for each sent request. It ensures that all
mandatory parameters are in check and that the message meets all API requirements:
● IP per sender ID​ – Each ID is unique and is given to the partner upon the account’s creation.
Each sent message will first match the ID in the request to the partner’s set of whitelisted
IPs on Viber’s database.
● Text length​ – Each message can contain up to 1000 utf-8 characters in the #txt" field.
Spaces and special characters will also be counted towards the limit.
● Label ​– Must meet one of the following values: “promotion” / “transaction”.
Each request will be successfully sent with either one of these labels. Billing will not be
affected by this parameter.
● Caption ​– When sending a promotional message containing a button, the text of the button
can contain a maximum of 30 characters.
● User’s supported Viber version​ – In order to receive a Business Message, a user must have
following versions (or higher) of Viber installed: Android 5.4 and iOS 5.3.
● Billing ​– Our billing system checks that each sent message meets criteria such as available
destination, credit limit, etc.

send_message request
After the API is successfully integrated, you can begin to send Business Messages.

To help you better track your messages, each send_message request you make will be
constructed using several mandatory parameters:

Request type POST

Request endpoint https://services.viber.com/vibersrvc/1/send_message

Example request
{
"service_id":​3001​,
"dest":​"972511887887"​,
"tag":​"SaleCamp 12"​,
"seq":​123456​,
"label":​"promotion"​,
"ttl":​60​,
"type":​206​,
"message":
{
"#txt":​"a message for our viber user. "​,
"#tracking_data":​"tracking_id:100035"
}
}

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and company
private information. no personal or identifying info on document)
General Request Parameters

Field Name Description Validation

service_id The ID is a unique value in each sent request that each business (Mandatory) - For matching the
account receives when it's created. Each ID is given only to the correct BM account.
partner the account belongs to and this account can be utilized
only with its dedicated sender ID.

Dest A complete phone number to which the message will be sent. (Mandatory) - Checking if the
The number must consist of digits only, with no special destination in the request is
characters between them. available for this BM account.

Tag Free text. Reports can be generated based on tags. (Optional)

Seq A unique identifier of a message from the partner's side that (Mandatory) - A field that is
links between the request and the response. reflected in the response as well.

Label The partner states the nature of the message for Viber to (Mandatory) - For Viber’s internal
identify if the account is mostly sending promotional or purposes.
transactional content.

Message Defines the type of content that is sent in each message (​more (Mandatory) - To determine the
type info​). type of content in the message.

TTL The TTL value will be in seconds to specify how long the API (Optional) - In its absence, the
should try to deliver the message for. If no TTL value is set, The request will be set automatically
API will try to deliver the message for up to 14 days (​more to the maximum value.
info​).

Message #txt - The text sent to the user. (Mandatory) - In transactional


parameters and promotional message types.

#img - The URL used to store the Image. (Mandatory) - In promotional


messages types.

#caption - The text that will appear on the action button. (Mandatory) - In promotional
messages types.

#action - The URL users are directed to or the action performed (Mandatory) - In promotional
when pressing the action button. messages types.

#fileName - The name of the file shared by the business with (Mandatory) - In promotional file
the user. sharing message types.

Tracking A string that will be sent back to the partner when a message (Mandatory) - For 2way accounts
data sent to a user is answered. The user’s reply is linked to the only.
tracking data value that is set in the request.

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and company
private information. no personal or identifying info on document)
Time To Live (TTL)
Each business message can be sent with a predefined Time To Live (TTL) value. This value will
determine the maximum amount of time delivery attempts will be made for. The TTL value is
set per message and usually depends on the content of the message. For example, it’s better to
send more sensitive content with a shorter TTL (such as bank transaction details).
The TTL can be set between 30 seconds (minimum)​**​ and up to 1,209,600 seconds (maximum).
We recommend not setting a low TTL when sending a large number of messages. This will help
prevent cases where users will receive the messages but the delivery status will not be sent
back in time, making the message appear as expired.
In case no TTL is set in the request, message delivery attempts will continue for up to 14 days. If
the user is not able to receive the message during that time, it will automatically gain an
expired status.

**​Recommended​ minimum for TTL is 60 seconds

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and company
private information. no personal or identifying info on document)
Message types
You can configure each transactional and promotional message according to your needs. Our
message type selection contains text-based messages and richer content options, which can
include images and an action button.

Transactional Messages

1Way Business Message Types

Android/iOS Android/iOS
Type Functionality Desktop Message Structure
Smartphone Tablet

6
Text Only ✔ ✘ ✘ {
"#txt":​"Test
message."

106
Text Only ✔ ✔ ✔ }

Text Only {
301​* Template validation ✔ ✔ ✔ "#txt":​"Test
message."
(​learn more​)
}

*​Type 301 doesn’t require a “tracking_data” parameter since it can only be used with accounts
that are configured as 1way accounts.

2Way Business Message Types

Android/iOS Android/iOS
Type Functionality Desktop Message Structure
Smartphone Tablet

{
206 Text Only ✔ ✔ ✔ "#txt":​"Test
message."
}

Text Only {
306 Session ✔ ✔ ✔ "#txt":​"Test
message."
(​learn more​)
}

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and company
private information. no personal or identifying info on document)
Promotional Message Types

1Way Business Message Types

Android/iOS Android/iOS
Type Functionality Desktop Message Structure
Smartphone Tablet

7 Image Only ✔ ✘ ✘ {
"#img":​"https://www.viber.co
m/app/uploads/viber-logo.png
"
}
107 Image Only ✔ ✔ ✔
{
"#txt":​"Test message"​,
8 Text+Image+Button ✔ ✘ ✘ "#img":​"https://www.viber.co
m/app/uploads/viber-logo.png
"​,
"#caption":​"Click me"​,
108 Text+Image+Button ✔ ✔ ✔ "#action":​"http://www.viber.
com"
}

{
9 Text+Button ✔ ✘ ✘ "#txt":​"Test message"​,
"#caption":​"Click me"​,
"#action":​"http://www.viber.
109 Text+Button ✔ ✔ ✔ com"
}

{
"#txt":​"Test message"​,
"#caption":​"Click me"​,
222 File ✔ ✔ ✔ "#action":​"http://www.viber.
com"​,
"#fileName": ​"yourFile.pdf"
}

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and company
private information. no personal or identifying info on document)
2Way Business Message Types

Android/iOS Android/iOS
Type Functionality Desktop Message Structure
Smartphone Tablet

207 Image Only ✔ ✔ ✔ {


"#img":​"https://www.vib
Image only er.com/app/uploads/vibe
r-logo.png"
307 Session ✔ ✔ ✔ }
(​learn more​)

{
"#txt":​"Test message"​,
208 Text+Image+Button ✔ ✔ ✔ "#img":​"https://www.vib
er.com/app/uploads/vibe
r-logo.png "​,
"#caption":​"Click me"​,
Text+Image+Button
"#action":​"http://www.v
210 Image opens full screen upon ✔ ✔ ✔ iber.com"
tap
}

{
"#txt":​"Test message"​,
209 Text + Button ✔ ✔ ✔ "#caption":​"Click me"​,
"#action":​"http://www.v
iber.com"
}

220 File ✔ ✔ ✔
File
{
221 Session ✔ ✔ ✔ "#txt":​"Test message"​,
(​learn more​) "#caption":​"Click me"​,
"#action":​"http://www.v
iber.com"​,
223 File ✔ ✘ ✘ "#fileName":
"yourFile.pdf"
File }

224 Session ✔ ✘ ✘
(​learn more​)

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and company
private information. no personal or identifying info on document)
Sessions
Sessions are 2way message chats that allow you to communicate with a user in a defined time
frame. Mainly to be used for customer support purposes, sessions will open up a new channel
of communication between you and your subscribers.
The ​session rate will be applied ​ONLY​ if the user initiates the conversation. If you send a
message and it turns into a session (due to the development of a conversation) the session will
start from the first message sent by the user.
Session Billing:​ You will be billed per session and not per delivered message. This will allow
your team to send and receive multiple messages at a fixed per-session price .
Each session will be configured as follows:
● The session is set to a default period of 12 hours.
● Up to 60 messages can be sent in a single session by the business account. After 60
messages have been sent, a new session will begin automatically.
● A fixed rate is set according to the message type.
● You can send up to 10 messages in a row without the user’s reply, otherwise the session
will end.

NOTE:​ Sessions require a dedicated business account. If you have an existing business account
and would like to use sessions, you will need to create a new account.

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and company
private information. no personal or identifying info on document)
File Transfer
You can send and receive files as long as they are on the following list of supported formats and
under 20MB:
File Type File Formats File Max Size

Documents .doc, docx, .rtf, .dot, .dotx, .odt ,odf, .fodt, .txt, .info

PDF .pdf, .xps, .pdax, .eps 20MB

Spreadsheet .xls, xlsx, .ods, .fods, .csv, .xlsm, .xltx

Files sent from a business account to the user​ – All files sent from your business account to
users will be hosted and stored on your side. To access files, you will need to apply a download
link (which we will provide you with) to the request as an action parameter. To complete the
request you will also need to add the following parameters:
● File type
● File name – maximum 25 characters

{
"service_id":​3001​,
"dest":​"972511887887"​,
"tag":​"SaleCamp 12"​,
"seq":​123456​,
"type":​220​,
"file_type": ​"docx"​,
"message":
{
"#action":​"https://fileUrlAddress.com/file.pdf "​,
"#tracking_data": ​"tracking data info"​,
"#fileName": ​"yourFile.docx"
}
}

In addition to dedicated message types that are used to send standalone files (220-224), the API
allows you to use other message types to also send files. Message types 8, 108, 9, 109, 208,
209, and 210 all include an action parameter that offers the opportunity to share a file with the
user.
Files sent from the user to your business account​ – The user will also have the option to share
files with you (on 2way accounts). Each file sent from the user to you will be stored on Viber’s
server for up to 7 days, after which it will no longer be available for you to download. The same
formats and limitations will be applied in this case.

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and company
private information. no personal or identifying info on document)
Templates
In order for a message to be defined as transactional, it should be sent according to a structure
that was approved (per business ID) by Viber.

NOTE:​ This feature is currently only available in Russia and only for messages written in
Russian. Please contact us for more information.

Template Matching
Viber’s template matching process uses official regex libraries and follows official regex rules.
There are a few exceptions that relate to the cleaning process, which we added to improve the
template matching performance. In case of an exception, the algorithm will mark the template
as invalid and won’t upload it to the system.
Regex Exceptions Invalid Template Example Valid Template Example

Regex flags Templates cannot begin or /​Hello \w+ your order ^​Hello \w+ your order
end with flags such as​: number is \d+​/ui number is \d+​$
"/" or​ ​"/ui"

White Templates cannot begin or space​Hello \w+ your order no space​Hello \w+ your
spaces end with a white space​. The number is \d+​space order number is \d+​no
following will also be space
considered as spaces that are
not accepted at the beginning \s​Hello \w+ your order no space​Hello \w+ your
or end of the template: number is \d+ order number is \d+​no
"\s","\s+","(\S+\s+){1,10}" space

(\S+\s+){1,10}​space​Hello (\S+\s+){1,10}​no
space​Hello

For repetitions at the end: For repetitions at the end:


Hello (\S​+\s){1,9}\​S*
Hello (\S​+\​s+​){1,10} Or
Hello(\s​\S+){1,10}

Double A template will not match if a Hello \w+ your order Hello \w+ your order
spacing double space is used number is(​space,space​)d+ number is​space​\d+
anywhere

New line Templates cannot contain a Hello \w+​\n Hello \w+ your order
new line Your order number is \d+ number is \d+

Percentage Using "%" in a template is an Hello ​%​w+ your order Hello ​\​w+ your order
variables invalid regex. Expected regex number is ​%​d+ number is ​\​d+
should contain "\d+" or
"\w+" or "\S+".

Bad values The following values will not ['​space?​'] ​or​ ['​space*​'] ['​space​']​ ​or​ ['​space+​']
be accepted in the regex: "?"
or "*". Instead leave it blank ['​\\s?​'] ​or​ ['​\\s*​'] ['​\\s​']​ ​or​ ​['​\\s+​']
or use the following: "+"
['​(\\s)?​'] ​or​ ['​(\\s)*​'] ['​(\\s)​'] ​or​ ​['​(\\s+)​']

NOTE​: The maximum number of characters allowed in a template message is ​950​.

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and company
private information. no personal or identifying info on document)
Responses
Response Parameters
You will receive a response and the status for each message immediately after sending it.
“status”:0 ​indicates that the message was sent successfully .
Other fields that you will find in the response include:
● Status – Indicates if the message was sent successfully or failed.
● Seq – The same unique identifier of a message that appeared in the request will also be
reflected in the response, for tracking purposes.
● Message_token – A unique identifier for each message that will allow you to match the
message to its delivery status.
● Message_template_id - This field will appear in the response only when sending
message type 301. If the message text matches one of the templates of the business ID,
the field value will be the template ID.
● Session_id – This field will appear in the response only when sending message types 306
or 307 and will include the relevant session ID.

{
"status":​0​,
"seq":​123456
"message_token"​: ​"5379697806260881548"​,
"matching_template_id": ​5130325​,
"session_id": ​"7888877812345678901"​,
}

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and company
private information. no personal or identifying info on document)
Error Codes
The following is a list of status responses that you will receive after sending a message:

Status code Error on the server Detailed error

“status”:0 SRVC_SUCCESS Successfully sent.

“status”:1 SRVC_INTERNAL_FAILURE Internal server error.

“status”:2 SRVC_BAD_SERVICE_ID The ID wasn’t in use for over a year/The ID was recently created and
wasn’t uploaded to the server yet.

“status”:3 SRVC_BAD_DATA An error in the request’s structure. Could be a missing comma, brackets,
text over 1000 characters, etc.

“status”:5 SRVC_BAD_MESSAGE_TYPE Incorrect message type. Either a non-supported type or an incorrect


value.

“status”:6 SRVC_BAD_PARAMETERS Missing mandatory parameters, for example “tracking_data” on a 2way


account.

“status”:7 SRVC_TIMEOUT Indicates a server timeout on Viber’s end.

“status”:8 SRVC_USER_BLOCKED The ID was blocked by the user/The user blocked business messages
completely on their device.

“status”:9 SRVC_NOT_VIBER_USER The destination number is not registered as a Viber user.

“status”:10 SRVC_NO_SUITABLE_DEVICE Not an Android or iOS device with a Viber version that supports
Business Messages (5.3 and above).

“status”:11 SRVC_UNAUTHORIZED_IP The request was sent from a non-whitelisted IP for this ID/An incorrect
ID that doesn’t belong to the partner was used in the request.

“status”:13 SRVC_NOT_PERMITTED An error in the billing process – please contact ​[email protected]

“status”:18 SRVC_BAD_LABEL Missing value/Incorrect value in the request for “label” parameter.

“status”:20 SRVC_INVALID_TTL The TTL is under 30 seconds/The TTL is over 1,209,600 seconds.

“status”:21 SRVC_WAIT _FOR_USER_RESPONSE The attempt exceeded the 10 message limit within a session.

“status”:28 SRVC_FILE_NOT_PERMITTED The file that is being attempted to be sent is not in a supported format
for this feature.

“status”:29 SRVC_BAD_FILE_NAME_LENGTH The name of the file is more than the maximum 25 characters.

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and company
private information. no personal or identifying info on document)
Message Status Callback
Each sent message will receive one of the following callbacks:
● Delivered
● Seen
● Expired
The status is sent back to your Callback URL based on the message token that was received in
the response for that message. Only tokens that received a ‘delivered’ status will be billed.

Delivered status
A ‘delivered’ status will be sent back for each message that was successfully sent by you and
the user was able to receive. You may see several tokens that were delivered more than once.
This can happen if the user receiving the message has a Viber account on more than one device,
and depends on the message type that was used in the sent request.

{
"message_token": ​"5062966309699185666"​,
"message_status": ​0​,
"message_time": ​1499163009878​,
"phone_number": ​"972518900007"​,
"service_id": ​3001
}

Seen status
A ‘seen’ status indicates that a message that was successfully delivered was also opened by the
user (not all delivered messages are opened). Unlike ‘delivered’ and ‘expired’ statuses, the
‘seen’ status will not appear in your monthly billing reports.

{
"message_token": ​"5062966361712749577"​,
"message_status": ​1​,
"message_time": ​1499163023577​,
"phone_number": ​"972518900009"​,
"service_id": ​3001
}

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and company
private information. no personal or identifying info on document)
Expired status
An ‘expired’ status is given to a message that was successfully sent but didn’t get delivered
within the TTL that was set for it. Expiry status is similar to a delivery status mechanism and
depends on the user client to respond to a sent message. In case the message TTL was
exceeded without delivery, and the client does not send back an expired status, the message
will remain with a sent status.

{
"message_token": ​"5062956500358786049"​,
"message_status": ​2​,
"message_time": ​1499160690533​,
"phone_number": ​"972516140353"​,
"service_id": ​3001
}

If a user changed their subscription preference for your business account, you will receive
either a ‘subscribe’ or an ‘unsubscribe’ callback. ‘Subscribe’ indicates that the user unblocked
your account, and ‘unsubscribe’ indicates that you were blocked.

Subscribe

{
"message_token": ​"5062920946149490691"​,
"message_status": ​4​,
"message_time": ​1499152194213​,
"phone_number": ​"972513434432"​,
"service_id": ​3001
}

Unsubscribe

{
"message_token": ​"5062920923823210498"​,
"message_status": ​5​,
"message_time": ​1499152188905​,
"phone_number": ​"972513434432"​,
"service_id": ​2901
}

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and company
private information. no personal or identifying info on document)
URL Schemes
URL schemes allow you to create a shortcut to a specific screen within the app.
You can utilize this if you wish to direct a user to the following:
● Start a call​ - Opens the Viber keypad with the phone number that you entered in the
request. Viber to Viber calls are free, however, if the phone number in the request is not
a Viber number the user will need to pay for the call (using Viber Out).

viber://keypad?number=%2B<number>

● Open a 1on1 chat​ - ​Opens a 1on1 chat with the sender (the sender needs to have a
2way account).

viber://chat?service=<sender_ID>

● Open Viber QR scanner ​– ​ Opens a QR scanner through Viber. Tapping the button will
open the camera to capture a QR code.

viber://more/qr

Emojis

Just like in any 1on1 Viber chat, emojis can be used in messages sent from business accounts.
You will need to add the emoji code to the body of the message, and ensure that it keeps the
overall message character count under 1,000.

Please contact ​[email protected]​ for a complete list of emoji codes.

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and company
private information. no personal or identifying info on document)
Billing
You will be billed according to a variety of factors. As each message is unique in its construction,
our system analyses your messages case-by-case and prices them accordingly.

Minimum Fee

You will be billed a monthly fee, in addition to individual message costs, starting from your
second month of opening a verified business account with Viber. Each country that you have
open for messaging (Open Destinations) has a different rate, and your monthly fee will be the
total sum of these rates (regardless of if you sent a message to them or not). Please contact us
for more information on current country rates.

Labels vs Types

Your message’s label (transactional vs promotional) does not affect billing. Instead, the billing
rate is dependent on the message type (i.e. text vs non-text).

Open Destinations

During onboarding we will ask you to submit a list of countries that you would like to be able to
message (up to 20). Your billing rate will be a combination of the message type and the current
rate of sending a message to that country. Please contact us for more information on current
country rates.

TTL

The TTL determines how long each message will have to be delivered to the user before it
expires. When a TTL is set for over 5 days (maximum is 14 days), you will only be billed if the
message is successfully delivered in the first 5 days. If the message is delivered after 5 days, you
will NOT be billed.

Multiple Delivered Statuses

In some cases a message token will appear more than once, indicating that the message was
delivered several times to the same user. This scenario can occur when Viber is used on several
devices by an account holder and part of the message request is to be delivered to all devices
(for example message type 106). You will only be billed for the first message that the user
receives, and not for the number of tokens produced.

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and company
private information. no personal or identifying info on document)
API Security

One of Viber’s main priorities is to make sure that our API is secure and that our user’s privacy
is kept safe at all times. In order to fulfill this aim, we have the following measures in place:
● Viber only uses secured servers for Business Messages. All servers are hosted on
virtual private clouds
● All Business Messages are encrypted over HTTPS://
● During the integration phase, you will be asked to provide a set of IP addresses that
will be whitelisted on our server for every business ID created for you. This ensures
that only requests sent from the whitelisted IP addresses will be sent successfully .
The range of IPs used by Viber to send responses back to you are: 52.0.252.0-22

Business Messages Portal

Once you complete onboarding, you will receive access to the Business Messages Portal.
Through the portal you will be able to:
● Create new business IDs
● Manages business - activate and deactivate business IDs.
● Submit templates

The portal can be accessed via this link: ​https://bm.viber.com/login

For more information on Viber’s Business Messages, please contact us:

For technical questions: ​[email protected]


For business inquires: ​[email protected]

Rakuten Viber`s Privileged Information - Not for Distribution (For use on Internal memos and company
private information. no personal or identifying info on document)

You might also like