Client Documentation
Get StartedStatus Page
  • 360Dialog
    • Why you should use 360dialog as Business Solution Provider (BSP)
    • Prices, plans and payment options
  • client hub
    • 360Dialog Client Hub
    • Numbers
      • Manage your WABA
        • Account Statuses
    • Activity
    • Funds
      • Month Closing Invoice (MCI)
    • Payment Management
    • API Keys
    • Template Message Management
    • Partner Change
    • Cancellation
    • Downgrade
  • WhatsApp Marketing
    • Best practices to maintain Account Health and prevent being blocked
    • Driving users to your WhatsApp account
      • WhatsApp Channels
    • Business Search
    • Linking a WABA to a Facebook Page /EN
      • Vinculando uma conta WABA à uma página do Facebook /PT
      • Cómo vincular un WABA a una página de Facebook /ES
    • Linking a WABA to Google Message Ads
    • Ads that Click to WhatsApp (CTWA) /EN
      • Anúncios de Clique para o WhatsApp (CTWA) /PT
        • Como usar o WhatsApp para marketing e vendas? /PT
      • Anuncios que Click to WhatsApp (CTWA) /ES
        • ¿Cómo usar WhatsApp para marketing y ventas? /ES
    • Conversions API (CAPI)
    • Create Ads lookalike audience based on WhatsApp events
    • MM Lite API Beta
      • Onboarding
      • Sending Messages
  • waba basics
    • WhatsApp Business Platform
    • WhatsApp Accounts structure
    • WABA for Government Agencies
    • WABA Policy Enforcement
    • Architecture and Security
    • The Basics (Overview)
    • Webhook Events and Notifications
    • Messaging API
      • Messaging Health Status
      • Step to Step to move to Cloud API
        • [will be deprecated] WABA Integration (On-Premise)
    • Migrating Phone Numbers
      • Migrate number from Meta or alternate BSP to 360dialog Cloud API
      • Migrate a phone number to a new WABA
      • Migrate to alternate BSP
  • waba management
    • Creating new WABA
      • Using a new phone number
      • WhatsApp Coexistence
        • Coexistence Onboarding
        • Coexistence Webhooks
    • Display Name Guidelines
    • Meta Business Verification
    • Official Business Account (OBA) or blue badge
    • WABA Profile Info
    • Capacity, Quality Rating, and Messaging Limits
      • Accelerated Onboarding
    • Hosting type Change
  • waba Messaging
    • Sandbox (Test API Key)
    • Receiving messages
    • Before sending a message
      • Checklist for Message Broadcasts and Campaigns
    • Conversations
    • Messaging
    • Conversational Components
    • Media Messages
      • Upload, retrieve or delete media
    • Template Messages
      • Template Elements
      • Sending Template Messages
      • Authentication Templates
        • Zero-Tap Authentication Templates
        • One-Tap Autofill Authentication Templates
        • Copy Code Authentication Templates
      • Catalog Templates
      • Product Card Carousel Templates
      • Single-Product Message Templates
      • Coupon Code Templates
      • Limited-Time Offer Templates
      • Multi-Product Templates
    • Interactive Messages
      • Single and Multi Product Messages
      • Location Request Message
    • Flows
    • Products & Catalogs
    • Contacts and Location Messages
    • Payments (India Only)
      • Receive WhatsApp Payments via Payments Gateway
      • Receive WhatsApp Payments via Payment Links
      • Order Details Template Message
    • Payments (Singapore only)
      • Receive WhatsApp Payments via Stripe
  • Partners
    • Partner Documentation
  • Support
    • Help and Support
      • Opening Hours & Response Time
      • Status Pages
      • Meta Support
      • Common Issues
      • How to contact Support
    • Error Messages
    • Imprint & Data Privacy
    • FAQ
Powered by GitBook
On this page
  • Template Creation
  • Sending Copy Code Authentication Template Messages

Was this helpful?

  1. waba Messaging
  2. Template Messages
  3. Authentication Templates

Copy Code Authentication Templates

PreviousOne-Tap Autofill Authentication TemplatesNextCatalog Templates

Last updated 11 months ago

Was this helpful?

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.

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

Name
Type
Description

D360-API-KEY

string

Request Body

Name
Type
Description

name*

string

components*

array[objects]

Array of objects that describe the components that make up the template.

category*

string

Allowed values: AUTHENTICATION

language*

string

Post Body

{
  "name": "<TEMPLATE_NAME>",
  "language": "<TEMPLATE_LANGUAGE>",
  "category": "authentication",
  "message_send_ttl_seconds": <TIME_T0_LIVE>, // Optional
  "components": [
    {
      "type": "body", 
      "add_security_recommendation": <SECURITY_RECOMMENDATION> // Optional
    },
    {
      "type": "footer", 
      "code_expiration_minutes": <CODE_EXPIRATION> // Optional
    },
    { 
      "type": "buttons",
      "buttons": [
        {
          "type": "otp",
          "otp_type": "copy_code",
          "text": "<COPY_CODE_BUTTON_TEXT>"  // Optional
        }
      ]
    }
  ]
}

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

Placeholder
Description
Example Value

<CODE_EXPIRATION>

Integer

Optional.

Indicates the number of minutes the password or code is valid.

If included, the code expiration warning and this value will be displayed in the delivered message. The button will be disabled in the delivered message the indicated number of minutes from when the message was sent.

If omitted, the code expiration warning will not be displayed in the delivered message. In addition, the button will be disabled 10 minutes from when the message was sent.

Minimum 1, maximum 90.

5

<COPY_CODE_BUTTON_TEXT>

String

Optional.

Copy code button label text.

If omitted, the text will default to a pre-set value localized to the template's language. For example, Copy Code for English (US).

Maximum 25 characters.

Copy Code

<SECURITY_RECOMMENDATION>

Boolean

Optional.

Set to true if you want the template to include the string, For your security, do not share this code. Set to false to exclude the string.

true

<TEMPLATE_LANGUAGE>

String

Required.

en_US

<TEMPLATE_NAME>

String

Required.

Template name.

Maximum 512 characters.

verification_code

<TIME_TO_LIVE>

Integer

Optional.

60

Example Request

{
  "name": "authentication_code_copy_code_button",
  "language": "en_US",
  "category": "authentication",
  "message_send_ttl_seconds": 60,
  "components": [
    {
      "type": "body",
      "add_security_recommendation": true
    },
    {
      "type": "footer",
      "code_expiration_minutes": 5
    },
    {
      "type": "buttons",
      "buttons": [
        {
          "type": "otp",
          "otp_type": "copy_code",
          "text": "Copy Code"
        }
      ]
    }
  ]
}

Sending Copy Code Authentication Template Messages

Numbers registered before this date will still be supported, but should start planning a as soon as possible.

Template .

Authentication message time-to-live value, in seconds. See below.

See our to learn how to send it to customers.

change of hosting type
Authentication Templates documentation
Time-To-Live
View list of supported languages here.
language and locale code