How to Use WhatsApp OTP Through Qiscus Omnichannel?

  • Updated

The requirements to use WhatsApp OTP through Qiscus Omnichannel:

  1. You must have a Qiscus Omnichannel account. If you don’t have one, you can contact us here.
  2. WhatsApp account integrated with Qiscus Omnichannel.
  3. Approved broadcast message template(s) with Authentication category.

Previously, OTP templates had the flexibility to include multiple elements, such as images or several variables. However, Starting from May 29, 2023, any newly created Authentication templates must adhere to the following guidelines:

  • Templates should not include links, media, or emojis.
  • Each parameter within the template should not exceed a maximum length of 15 characters.
  • The template should include Copy Code button.

 

You can send WhatsApp OTP using this API:

https://omnichannel.qiscus.com/whatsapp/v1/{{app_id}}/{{channel_id}}/messages

Example request:

curl --location -g --request POST 'https://omnichannel.qiscus.com/whatsapp/v1/{{app_id}}/{{channel_id}}/messages' \
--header 'Qiscus-App-Id: {{app_id}}' \
--header 'Qiscus-Secret-Key: {{secret_key}}' \
--header 'Content-Type: application/json' \
--data-raw '{
   "to": "{{phone_number}}",
   "type": "template",
   "template": {
       "namespace": "{{namespace}}",
    "name": "new_otp",
       "language": {
           "policy": "deterministic",
          "code": "en"
       },
     "components": [
           {
               "type" : "body",
               "parameters": [
                   {
                    "type": "text",
                    "text": "{{otp_number}}"
                 }
               ]
         },
{
               "type":"button",
               "sub_type": "url",
              "index": 0,
              "parameters": [
                   {
                       "type": "text",
                     "text": "{{otp_number}}"
                   }
               ]
          }
       ]
   }
}'

Example result:

u6mq1if0o3ci7ror4wsmsabjrb8pfeuvep6uy760xhrawa5yrcjuxwk7lhynx3e6.png

 

For broadcasting other types of templates, please read the following article:

Send WhatsApp Business API with Different Types of Template

 

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.