# Login security code WhatsApp template

> Authentication template to send a one-time login or two-factor code to SaaS users over WhatsApp. Copy-code button included.

- Category: Authentication
- Industry: SaaS and software
- Use case: Verification code
- Language: en_US
- Approval rate: 81%
- Page: https://template-builder.dev/whatsapp-template/saas-login-security-code
- JSON: https://template-builder.dev/whatsapp-template/saas-login-security-code.json
- Open in the playground: https://template-builder.dev/playground#t=eyJuYW1lIjoic2Fhc19sb2dpbl9zZWN1cml0eV9jb2RlIiwibGFuZ3VhZ2UiOiJlbl9VUyIsImNhdGVnb3J5IjoiQVVUSEVOVElDQVRJT04iLCJib2R5Ijp7ImFkZFNlY3VyaXR5UmVjb21tZW5kYXRpb24iOnRydWV9LCJmb290ZXIiOnsiY29kZUV4cGlyYXRpb25NaW51dGVzIjoxMH0sImJ1dHRvbiI6eyJ0eXBlIjoiT1RQIiwib3RwVHlwZSI6IkNPUFlfQ09ERSJ9fQ

## How to get it approved

Use COPY_CODE for the simplest setup; one-tap and zero-tap need Android app signatures. Keep expiry at 5 to 10 minutes.

## Message text

One-time verification code with a copy button.

## Template JSON

```json
{
  "name": "saas_login_security_code",
  "language": "en_US",
  "category": "AUTHENTICATION",
  "body": {
    "addSecurityRecommendation": true
  },
  "footer": {
    "codeExpirationMinutes": 10
  },
  "button": {
    "type": "OTP",
    "otpType": "COPY_CODE"
  }
}
```

## Create it with the Meta Cloud API

```sh
curl -X POST "https://graph.facebook.com/v26.0/$WABA_ID/message_templates" \
  -H "Authorization: Bearer $META_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "saas_login_security_code",
  "language": "en_US",
  "category": "AUTHENTICATION",
  "components": [
    {
      "type": "BODY",
      "add_security_recommendation": true
    },
    {
      "type": "FOOTER",
      "code_expiration_minutes": 10
    },
    {
      "type": "BUTTONS",
      "buttons": [
        {
          "type": "OTP",
          "otp_type": "COPY_CODE"
        }
      ]
    }
  ]
}'
```
