MESSAGE CATEGORY

Authentication

One-time passcodes, login codes, and account-verification messages. No approval step, and no follower relationship required.

Requirements

The recipient does not need to follow your business - authentication is the one category exempt from the follower check. Your developer app token must carry the authentication scope, and the business account must be live. Send with category: "authentication" and a message_content object; a plain body is rejected with invalid_message_content.

Content shape

Exactly these components, in any order; nothing else is accepted:

ComponentRequiredNotes
bodyRequiredPlain text, exactly one.
buttonsRequiredExactly one button, type otp, with text set to the bare 4-8 digit code. No other button type is valid here.
footerOptionalAt most one. Requires code_expiration_minutes (1-1440). Include the literal token {{code_expiration_minutes}} in text and the server substitutes the number.

There is no header component and no carousel for this category.

Example request body

{
  "to": "+15555550123",
  "category": "authentication",
  "message_content": {
    "language": "en",
    "components": [
      { "type": "body", "text": "Your ChatX verification code is below." },
      {
        "type": "footer",
        "text": "This code expires in {{code_expiration_minutes}} minutes.",
        "code_expiration_minutes": 10
      },
      { "type": "buttons", "buttons": [ { "type": "otp", "text": "482913" } ] }
    ]
  }
}

See the API reference for the endpoint and error codes, or Message types for how this compares to the other categories.