Skip to content
Last updated

The Viber Business Messages channel allows you to send predefined template messages. These templates are pre-constructed, and you refer to them by their template ID when sending the message. Currently, only one time passwords (OTP) templates are supported.

OTP templates

Viber Business Messages supports predefined one time passwords (OTP) templates. Note the following:

Below is an example of sending a Basic OTP template message:

{
  "message": {
    "template_message": {
      "channel_template": {
        "VIBERBM": {
          "template_id": "0aac888f-2ee2-4112-9659-1755a951966a",
          "language_code": "en",
          "parameters": {
            "pin": "1234"
          }
        }
      }
    }
  },
  "channel_properties": {
    "VIBERBM_TEMPLATE_MESSAGE_DEVICES": "ALL"
  }
}

The rendered message:

OTP Message

Each template is localized to multiple languages. The following languages are supported:

LanguageCode
Englishen
Arabicar
Bulgarianbg
Croatianhr
Czechcs
Danishda
Germande
Greekel
Spanishes
Finnishfi
Frenchfr
Hebrewhe
Burmesemy
Hungarianhu
Indonesianid
Italianit
Norwegianno
Dutchnl
Polishpl
Portuguese (Portugal)pt
Portuguese (Brazil)br
Romanianro
Russianru
Slovaksk
Serbiansr
Swedishsv
Thaith
Turkishtr
Ukrainianuk
Vietnamesevi
Persianfa
Belarusianbe

OTP template types

The Viber Business Messages channel supports a number a predefined OTP templates. Each of these templates can be referenced by a corresponding unique ID. The supported templates are listed below, and more details can be found in their corresponding sub-sections:

Basic OTP

Template ID: 0aac888f-2ee2-4112-9659-1755a951966a

Your code is {{pin}}.

Please don't share your code with ANYONE. We'll never call or message you and ask for it.

ParameterValue type
pintext

Basic OTP valid for 5 minutes

Template ID: c2cdc028-a48b-4187-bbaf-3aaa137b6e23

Your code is {{pin}}. It's valid for 5 minutes.

Please don't share your code with ANYONE. We'll never call or message you and ask for it.

ParameterValue type
pintext

Basic OTP with code validity time

Template ID: bed0942f-e07e-4879-834b-29cc4cf3ec35

Your code is {{pin}}. It's valid for {{code_validity_time}} minutes.

Please don't share your code with ANYONE. We'll never call or message you and ask for it.

ParameterValue type
pintext
code_validity_timenumber

OTP with type of code type

Template ID: 82ba31a3-db42-4e87-82e8-33fa92b9e5ed

Your {{pin_type}} code is {{pin}}.

Please don't share your code with ANYONE. We'll never call or message you and ask for it.

ParameterValue type
pin_typetext
pintext

OTP with code type & validity time

Template ID: 60d67b38-b9fb-444a-80e6-754447e010c6

Your {{pin_type}} code is {{pin}}. It's valid for {{code_validity_time}} minutes.

Please don't share your code with ANYONE. We'll never call or message you and ask for it.

ParameterValue type
pin_typetext
pintext
code_validity_timenumber

OTP with business/platform name

Template ID: c33cccaf-735f-4d62-8383-a76bf4999e2d

{{business_platform_name}}: Your code is {{pin}}.

Please don't share your code with ANYONE. We'll never call or message you and ask for it.

ParameterValue type
business_platform_nametext
pintext

OTP with business/platform name & validity time

Template ID: 6c929cef-29b4-4349-bc9d-2a07bdbb6e43

Your {{business_platform_name}} code is {{pin}}. It's valid for {{code_validity_time}} hours.

Please don't share your code with ANYONE. We'll never call or message you and ask for it.

ParameterValue type
business_platform_nametext
pintext
code_validity_timenumber

OTP with details on OTP action/platform

Template ID: 210ee8a9-1ed5-43cd-96e4-65bba311ab40

Your one-time password for {{business_platform_action_name}} is {{pin}}.

Please don't share your code with ANYONE. We'll never call or message you and ask for it.

ParameterValue type
business_platform_action_nametext
pintext

OTP with business/platform name & code reason

Template ID: be56d97b-2a33-4c89-ac5f-f555a2c827d9

{{business_platform_name}}: Your code is {{pin}}. You got this code because {{code_reason}}.

Please don't share your code with ANYONE. We'll never call or message you and ask for it.

ParameterValue type
pintext
business_platform_nametext
code_reasontext