We are sunsetting On-Premises API. Refer to our On-Premises API Sunset document for details, and to learn how to migrate to our next-generation Cloud API.

Two-Step Verification

/v1/settings/account/two-step

Use two-step verification to add an extra layer of security to the WhatsApp Business API Client. When you have two-step verification enabled, any attempt to register your phone number on WhatsApp must be accompanied by the six-digit PIN that you create using this feature. Two-step verification can be enabled and disabled using the /v1/settings/account/two-step endpoint.

Before You Start

You must use the admin account to access the two-step verification settings.

Enabling

To enable two-step verification, use the /v1/settings/account/two-step endpoint with the pin parameter.

Example

POST /v1/settings/account/two-step
{
    "pin": "your-6-digit-pin"
}

A successful request returns the HTTP Status Code 200 OK and either null or {}. If you encounter any errors, see Error and Status Messages.

Disabling

To disable two-step verification, make a DELETE call to the /v1/settings/account/two-step endpoint.

Example

DELETE /v1/settings/account/two-step

A successful request returns the HTTP Status Code 200 OK and either null or {}. If you encounter any errors, see Error and Status Messages.

Resetting your PIN

If you forget or misplace your PIN, you can disable two-step verification, and then enable it again with a new PIN.

Using the Two-Step Verification PIN in Registration

If you are trying to re-register while the account has two-step verification enabled, include the pin parameter in the registration request. For more details on registration with two-step verification enabled, see the Registration documentation.

Changing Your Two-Step Verification PIN

To change your business phone number's two-step verification PIN:

  1. Load your business portfolio in the WhatsApp Manager.
  2. If it doesn't automatically load the Phone numbers panel, navigate to Account tools (the toolbox icon) > Phone numbers.
  3. Click the phone number's settings (gear) icon.
  4. Click Two-step verification.
  5. Click Change PIN and complete the flow.

You must supply your current PIN in order to change it. Note that you can also set a new PIN using our APIs:

Disabling Two-Step Verification

To disable two-step verification, follow the steps for changing your PIN, but click the Turn off two-step verification button as the final step instead. An email with a link will be sent to the email address associated with your business portfolio. Use the link to disable two-step verification. Once disabled, you can re-enable it by setting a new PIN.