Copy Code Authentication Templates
Copy code authentication templates allow you to send a one-time password or code along with a copy code button to your users.
When a WhatsApp user taps the copy code button, it copies the password or code to the device's clipboard. The user can then switch to your app and paste the password or code into your app.
This process does not require the HandShake and App Signing Hash.
Copy code button authentication templates consist of:
Preset text: <VERIFICATION_CODE> is your verification code.
An optional security disclaimer: For your security, do not share this code.
An optional expiration warning (optional): This code expires in <NUM_MINUTES> minutes.
A copy code button.
URLs, media, and emojis are not supported.
Template Creation
You can use the WABA API to create copy code authentication templates. Alternatively, users can also create it using the WhatsApp Business Manager.
Use the create template endpoint and assemble the components in the request:
The base-url should be https://waba-v2.360dialog.io
for Cloud API and https://waba.360dialog.io
for On-Premise.
If you are using On-Premise API, remember that it is being discontinued by Meta. No new signups will be allowed with this type of integration from May 15, 2024.
Numbers registered before this date will still be supported, but should start planning a change of hosting type as soon as possible.
POST
[base-url]/v1/configs/templates
The message template name field is limited to 512 characters. The message template content field is limited to 1024 characters.
Headers
Request Body
Post Body
Note that in your template creation request the button type
is designated as OTP
, but upon creation the button type
will be set to URL
. You can confirm this by performing a GET request on a newly created authentication template and analyzing its components.
Properties
Example Request
Sending Copy Code Authentication Template Messages
See our Authentication Templates documentation to learn how to send it to customers.
Last updated