Whatsapp Verification

Introduction

WhatApp Verification (SendTalk 2.0) is a method of verification that requires a customer to send a WhatsApp message to SendTalk’s WhatsApp Official Business Account to trigger the verification process for the customer.

Below is the sample process that we recommend our clients to use if they are planning on using WhatApp Verification as a verification method for their applications.

Recommended Verification Flow:

  1. User Login User initiates a login on client's application using phone number that is registered to WhatsApp.

  2. Request Verification Client's application will trigger client's backend server to request create verification to SendTalk's server through API call.

  3. Return Payload Once SendTalk's server receive an API call from client's server, SendTalk will process the verification request and return a payload containing:

    1. Verification ID

    2. WhatsApp message link

    3. WhatsApp message

    4. QR code

    We suggest clients to save this verification ID to their own database along with a verification status.

  4. WhatsApp Message Link WhatsApp message link is a link that can be accessed by a customer to redirect them to a chatroom in their WhatsApp application where the recipient will be SendTalk's WhatsApp Official Business Account and a predefined message template will show up on their text composer. After receiving the WhatsApp Message Link from SendTalk's server, we suggest clients to redirect their users to this link. Try creating your own Deep Link with these documentations: iOS : https://docs.taptalk.io/powertalk-chat-sdk-documentation/powertalk-ios/deep-linking Android : https://docs.taptalk.io/powertalk-chat-sdk-documentation/powertalk-android/deep-linking

  5. Send WhatsApp Message After users are redirected to the link and to WhatsApp, users must send the message without changing the content to trigger the verification checking from SendTalk. There is an instruction in the template message that ask the users to go back to the application that triggered the verification process.

  6. Validate SendTalk will validate every message received in SendTalk's WhatsApp Official Business Account.

  7. Webhook URL SendTalk will send a Webhook call to registered Webhook URL if a verification succeeded. Clients can update the verification status on their database based on the payload from Webhook.

  8. Verification Status Client can trigger a verification check to their database right after the user went back to the application.

Setup

Go to https://sendtalk.taptalk.io and login if you already have an account.

Browse to "WhatsApp Verification" > "Verification Config" and click "Edit" to enable your WhatsApp Verification.

Enable the WhatsApp Verification, input your Webhook URL ans click "Save Changes".

Once saved, a Secret key will be generated and you can use this as a validator for this webhook call. WhatsApp Verification is ready to use.

API Documentation

Request Create WhatsApp Verification

POST https://sendtalk-api.taptalk.io/api/v1/verification/create_whatsapp_verification

Parameter

{
    "userPhone": "6281212345678",
    "languageCode": "id",
    "expiryMinutes": 10,
    "appURL": "https://web.taptalk.io"
}

Success 200

HTTP/1.1 200 OK
{
  "status": 200,
  "error": {
    "code": "",
    "message": "",
    "field": ""
  },
  "data": {
    "success": true,
    "message": "WhatsApp verification created successfully",
    "reason": "",
    "verification": {
      "id": "3f35ec07-77f1-4fa0-9416-8ef019e52189",
      "waLink": "https://wa.me/6281212345678?text=Mohon+jangan+ubah+teks+verifikasi+ini.%0A%0AKode+Verifikasi%3A+TTJZek5XVmpNRGN0TnpkbU1TMDBabUV3TFRrME1UWXRPR1ZtTURFNVpUVXlNVGc1T25kS1RXSlhlWGhhY0hKS1IzVmFkbm89%0ABerlaku+sampai+dengan%3A+16%3A09%3A00+19-06-2023%0A%0A%2APastikan+nomor+WhatsApp+ini+sama+dengan+nomor+yang+Anda+gunakan.%2A%0A%0AKirim+teks+ini+tanpa+mengubah+isinya%2C+lalu+silakan+kembali+ke+aplikasi.",
      "waMessage": "Mohon jangan ubah teks verifikasi ini.\n\nKode Verifikasi: TTJZek5XVmpNRGN0TnpkbU1TMDBabUV3TFRrME1UWXRPR1ZtTURFNVpUVXlNVGc1T25kS1RXSlhlWGhhY0hKS1IzVmFkbm89\nBerlaku sampai dengan: 16:09:00 19-06-2023\n\n*Pastikan nomor WhatsApp ini sama dengan nomor yang Anda gunakan.*\n\nKirim teks ini tanpa mengubah isinya, lalu silakan kembali ke aplikasi.",
      "qrCode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEAAQMAAABmvDolAAAABlBMVEX///8AAABVwtN+AAAF7UlEQVR42uzZPY7rrBoH8L9FQRc2gMI2KCKxJaebKuBqunhLSFN4G0RsAHcUyP8r8vGe29tndK..."
    }
  }
}

Error 4xx

HTTP/1.1 200 OK
{
  "status": 400,
  "error": {
    "code": "40002",
    "message": "User phone is required",
    "field": "userPhone"
  },
  "data": {}
}

Webhook Payload

Below document will describe the details of a WhatsApp Verification Webhook payload that will be sent every time a verification has been verified via a POST API Call to client's Webhook URL.

{
    "id": "fc0977f2-baa9-476d-8a3d-128c622d5ff6",
    "userPhone": "628124630350",
    "status": "verified",
    "verifiedTime": 1692847205385
}

Client Example

To help you implement WhatsApp Verification smoothly, you can check our Client Examples for using SendTalk by clicking this link https://github.com/taptalk-io/sendtalk-client-example/tree/main

For more information feel free to contact us via support@taptalk.io or simply click the link below to chat from WhatsApp.

Last updated