Authentication/nOTP (WhatsApp)

nOTP (WhatsApp) Settings

Customize your nOTP authentication from the Descope console (Authentication Methods > nOTP).

All Settings

A one-time password (OTP) is an automatically generated string sent to the user during the onboarding (sign-up or sign-in) process to authenticate that user. The WhatsApp account will be waiting for the user to insert his OTP to continue the authentication process.

SettingVariableDetails
Enable method in API and SDKThis toggle switch enables or disables the authentication method from being available for use within API and SDK
Expiration time{{expirationTime}}length of time after which link or code expires
ConnectorThe configured connector to utilize to send the nOTP message (See below for connector details). The default is Descope.
Templates (Verification, Approval, Error)If you are using a customized connector, you can change the templates of the message which your user will receive. The default is System.

Templates

You can use your WhatsApp business account to set up templates.

Descope nOTP customize messages

WhatsApp connector setup

Add your own WhatsApp business account for nOTP authentication from the Descope console (Connectors > WhatsApp Chat). This will allow you to customize the messages (verification approval, error) if needed.

Prerequisites

  1. WhatsApp business account
  2. Set up Webhooks

Connector Setup

  • Connector name: Custom name for your connector. This will come in handy when creating multiple connectors from the same connector template.
  • Connector description: Describe what your connector is used for.
  • Phone Number ID: The WhatsApp unique phone number ID for the account phone number. See WhatsApp documentation above for more details
  • Phone Number: The WhatsApp account phone number. See WhatsApp documentation for more details
  • Token: The authentication token associated with the phone number Id.
  • App Secret: The app secret associated with the WhatsApp Web Application.
  • Webhook Verify Token: The webhook verify token associated with the WhatsApp Web Application.

Additional Steps

You need to configure the webhook in the WhatsApp Web Application:

  • Callback URL: set https://api.descope.com/v1/whatsapp/webhook/<your-project-id>
  • Verify Token: set the webhook verify token associated with the WhatsApp Web Application. Read more about setting up webhooks in the WhatsApp Business API settings on the Developer Facebook Docs.
TriangleAlert

Important Note

In order to save the callback URL in WhatsApp app, you need to set the connector in the nOTP authentication page.

Was this helpful?

On this page