Skip to main content

WhatsApp Pro

info

WhatsApp verification is included in our Pro Add-on and becomes available once Pro is installed.

With WhatsApp set up, your users can approve a login from their phone. When 2FA verification is required, we send an authorization message to the user's WhatsApp number and the login continues as soon as they approve it.

This page covers the basics to get you started, it is not a full reference yet.

Before You Start​

You need a WhatsApp Business app that can send messages through the WhatsApp API, which gives you the phone number ID, app secret and access token asked for below. We highly recommend a dedicated phone number, since all replies to that number are intercepted and answered automatically.

Settings​

Visit the WP Dashboard > Settings > Login With Ajax > Integrations tab, scroll down to the WhatsApp Integration section and check Enable WhatsApp.

SettingDescription
Phone NumberThe WhatsApp number used to send and receive messages for your site.
Phone Number IDNot the phone number itself, but the ID WhatsApp assigns to it.
App SecretFound in your app settings. It is used to verify incoming webhooks.
Access TokenAn authorization token for your app.
Authorization Template NameThe message template used to authorize a login, authorize_login by default.
Verify Setup TemplateThe message template used when a user first verifies their WhatsApp number as a 2FA method, verify_setup by default. This helps prevent spamming.

Webhook​

The settings section shows the webhook Callback URL for your site. Add that URL to your WhatsApp app, and use your App Secret as the "verify token".

Message Templates​

WhatsApp only delivers messages that use an approved template. Create a template with a matching name for every language locale on your site, the settings page tells you what your current locale is.

Testing​

Fill out the credentials, enter a valid international phone number and click Send Test Message before saving. For the test to work you must have a template in the same locale as your site. WhatsApp provides hello_world by default for testing.

Using WhatsApp for 2FA​

Enable WhatsApp in your 2FA methods. Each user then adds their WhatsApp number in their own 2FA settings and approves the message we send to confirm it. From then on they can authorize a login by approving the request sent to that number. A request expires after a short time and can be resent from the login form.

info

If you already send messages through Twilio, Pro can also deliver WhatsApp verification through your Twilio account. This is configured in the Twilio section of the same Integrations tab.