Tutorials
Authenticate End Users by Using Chat Apps
Authenticate End Users by Using Chat Apps

Authenticate End Users by Using Chat Apps

Use communication channels on Infobip API to authenticate end users.

Send end users an authentication option through the selected channel. End users can use this authentication option to complete the associated action.

Example:

  • Activate or log on to account: Send end users an authentication link through WhatsApp. End users can follow the link to log on to your website instead of using their credentials to log on.
  • Send verification codes: Send end users verification codes through WhatsApp. End users can enter this code on your web site to complete the authentication process.
  • Opt in to your channel: On your web page, create a link containing an authentication code and a Send button. When end users click the Send button, they give you permission to start communicating with them through WhatsApp.
  • Confirm suspicious transactions: Identify potentially fraudulent activities on end users' accounts and send the end users an alert through WhatsApp. End users can reply 'Y' to the message to confirm that the transaction is genuine.

This tutorial explains how to send credit card activation instructions to customers through WhatsApp.

Note

This tutorial uses WhatsApp as the communication channel. You can customize the steps in this tutorial to use other communication channels such as KakaoTalk, LINE, Viber, and Zalo.

WhatsApp use case - package tracking notification

Process Workflow

WhatsApp use case - credit card activation process diagram

Before Getting Started

You must have an Infobip account to use the communication channels. Log in (opens in a new tab) or register for an account.

Compliance and Guidelines

You can use a WhatsApp message template only after WhatsApp approves the template. For more information about using WhatsApp as the communication channel, refer to WhatsApp Deliverability and Compliance.

Note

Each communication channel may have its own compliance and guidelines.

Implementation Steps

This tutorial can be implemented using API.

Create the Template

Create the template and use placeholders to personalize your message.

Note

Customize the steps in this section based on the channel that you want to use. Example: For channels in which you cannot use the 'call phone number' button, list the phone number in the template text instead.

Template nameTemplate body LanguageCall to Action Template ButtonsApproved
Card_activationHi {{1}},Your credit card has been sent to your address today. In order to activate your card, please give us a call.enButton:Type of action: Call Phone NumberButton Text: Contact UsCountry: GB +44Phone Number: 1123456789 

Register the Template

Before you start using WhatsApp message templates, you must get the templates approved by WhatsApp.

To register your template, provide the following information to Infobip:

  • Template name
  • Content
  • Language

Infobip sends the template to WhatsApp for approval.

After the template is approved, you can reuse it and personalize it for each customer.

Send Message via API

Note

The steps in this section are for the standalone WhatsApp API. Customize these steps for the channel that you want to use. Example: For channels that use the OMNI API, you would need to create a scenario and include the scenarioKey.

  1. Log in to Infobip API Resource hub" (opens in a new tab) and copy your BASE URL. The base URL is in the following format: https://{baseUrl}.api.infobip.com/ For more information, refer to Base URL.
  2. To send the message template, use an API development tool such as Postman, and choose the POST method.
  3. Replace the endpoint with https://{baseUrl}.api.infobip.com/whatsapp/1/message/template.
  4. Add the Authorization header. Example: Basic: Base64 encoded username and password For more information, refer to Authentication (opens in a new tab).
  5. Specify the destination phone number to which you want to send the notification.

Request Example:

json
 
    {
      "messages": [
        {
          "from": "441134960000",
          "to": "441134960001",
          "messageId": "a28dd97c-1ffb-4fcf-99f1-0b557ed381da",
          "content": {
            "templateName": "card_activation",
            "templateData": {
              "body": {
                "placeholders": [
                  "Nick"
                ]
              }
            },
            "language": "GB"
          }
        }
      ]
    }
 

On the end-user's device, the message looks as follows:

Notification on end user device

Need assistance

Explore Infobip Tutorials

Encountering issues

Contact our support

What's new? Check out

Release Notes

Unsure about a term? See

Glossary

Research panel

Help shape the future of our products
Service Terms & ConditionsPrivacy policyTerms of use