Get all Viber Session Messages by a Phone Number

Response parameters

ParameterTypeDescription
contentArray of Session ObjectsAn array containing session objects where the phone used in the query is either the sender or the recipient.
lastBooleanWhether the current page is the last one.
totalPagesIntegerThe number of total pages.
totalElementsIntegerThe total amount of elements for the current search.
numberOfElementsIntegerThe number of elements currently on this page.
firstBooleanWhether the current page is the first one.
sizeIntegerThe requested page size.
numberIntegerThe requested page number.

Session object

ParameterTypeDescription
sessionIdStringThe session id returned by Viber when a message fulfils the requirements to be in a session.
sessionMessagesArray of Viber messages.Viber messages belonging to the same session. The phone number used in the query will have to be the recipient or the sender.

Session Message (Same as Viber Message)

trackingIdStringThe tracking id of the individual message.
toStringThe recipient of the message
fromStringThe sender of the message
countryStringThe country of the recipient. (If applicable)
statusStatus objectThe object with the status of the message.
applicationNameStringThe Routee application name that was used to generate the auth token for the API usage
directionEnumerator StringThe direction of the message, possible values Inbound, Outbound
ttlStringTime range until message expires.
messageStringThe text of the viber message.
imageUrlStringThe url of the image.
fileFile objectAn object holding the variables of a file exchanged between BA and customer.

Status object

ParameterTypeDirection
statusEnumerator StringThe current status of the viber message.
Check here for possible values.
dateStringThe updated date of the status.
reasonReason objectThe reason of the status.

Reason object

ParameterTypeDescription
detailedStatusStringThe current detailed status.
Check here for details.
descriptionStringThe description of the detailed status.

File object

ParameterTypeDescription
fileUrlStringThe url of the file sent / received
fileTypeStringThe type of the file sent / received.
fileNameStringThe name of the file sent / received.

Viber Video Object

ParameterTypeDescription
videoUrlString (1000 max chars, only https)The URL where the video is hosted.
videoThumbnailString (1000 max chars, only https)The URL of a thumbnail for the Video.
fileSizeInteger (positive number, 200 max)The file size in MB.
durationInteger (positive number, 600 max)The video’s duration in seconds.
Language