Messaging

One-time code message tester

Preview an OTP template, see its segment count, and flag a link, brand name or code length that could break delivery.

Free, no accountIn your browser

The exact text you plan to send, code and all. Nothing you type here is stored.

Checked against the body, case-insensitively - whether it needs to be there depends on the country below.

Checks the link and brand name against the sender ID rules by country table for this one. Only the countries that table sourced are listed.

Try

Result

Nothing to test yet

Paste the OTP template you plan to send and it is checked as you type.

What this is

This otp message tester previews the exact text of a one-time code template: how many segments it is billed as, whether its code is a typical length, and whether a link or a brand name in the body breaks the sender ID rule for the country you are sending to.

A one-time code message is judged on three things that have nothing to do with whether the code is correct: how many segments the text costs, whether a link in the body is something the destination country's carriers restrict, and whether the brand name needs to be in the body at all - which depends entirely on whether that country's alphanumeric sender ID can carry it.

The country check reads straight from the sender ID rules by country table, so the two tools can never disagree about what a given country's rule actually is. A country this tool has not sourced a rule for says so plainly, rather than quietly treating the template as fine.

How to read the result

The headline is the segment count, the number of links found, and the length of the longest numeric code in the template. The findings below explain each one and, where something is worth fixing, what to do about it.

Paste in a brand name and a destination country to check the brand-name rule specifically: in a country with no alphanumeric sender ID, the brand has to be in the body or it appears nowhere at all; in a country where the sender ID already carries it, the same brand in the body is harmless but not required.

An OTP template inherits every rule an SMS has to clear to arrive at all; see sending an SMS that arrives for how segment pricing, sender-name rules and A2P throughput interact.

Common mistakes

What goes wrong most often, and how to tell.

  • Assuming the brand name belongs in the body everywhereWhether a brand name needs to be in the message body depends on whether the destination country's alphanumeric sender ID can carry it at all. In a country with no alpha sender ID, the body is the only place the brand can appear; in one where it is supported, the sender ID already shows it.
  • Treating a template preview as proof the message will arriveThis checks the text of the template only. It has no way to confirm the code is actually delivered, or delivered before the person waiting for it gives up - that depends on the carrier and the network on the day, not on anything in the message itself.
  • Picking the first number in the template as the codeA template often has more than one number in it - "expires in 10 minutes" as well as the code itself - and the real code is usually the longest run of digits, not the first one a person reads.

Questions

What people ask about this tool.

  • No. This previews the text of the template only - the segment count, the code length, a link, a brand name - and has no way to send anything or confirm delivery. Whether a message arrives, and arrives in time, depends on the carrier and the network on the day.
  • Because whether a brand name needs to be in the message body depends entirely on whether that country's alphanumeric sender ID can carry it. Where it can, the sender ID already shows the brand; where it cannot, the body is the only place the brand name can appear at all.
  • It means this tool has not sourced an alphanumeric sender ID rule for the country you entered, so it cannot check a link or a brand name against one. It says so rather than guessing, the same way the sender id rules by country table does for a country it has not checked.
  • Most one-time code providers issue a code between 4 and 8 digits, so a much longer run of digits in a template usually turns out to be an order number, a timestamp or a placeholder rather than the actual code, and is worth a second look before you send it.

Use it from the API

The same check, as one request.

Request
curl -X POST https://resellerhq.com/api/tools/otp-message-tester \
  -H "Content-Type: application/json" \
  -d '{"template":"Your code is 482913. It expires in 10 minutes.","brand":"","country":""}'
Response
{
  "tool": "otp-message-tester",
  "input": {
    "template": "Your code is 482913. It expires in 10 minutes.",
    "brand": "",
    "country": ""
  },
  "result": {
    "verdict": {
      "tone": "success",
      "headline": "1 segment · 0 links · code 6 digits",
      "summary": "Nothing about this template needs a second look, though a preview here cannot confirm delivery."
    },
    "findings": [
      {
        "id": "fits-one-segment",
        "severity": "pass",
        "title": "Fits in a single SMS segment",
        "detail": "This template is 46 of 160 septets, so it is billed as one segment rather than split into several."
      },
      {
        "id": "code-length-typical",
        "severity": "pass",
        "title": "The code \"482913\" is 6 digits, a typical length",
        "detail": "6 digits is within the 4 to 8 digit range most one-time code providers use, so this reads as a real code rather than a stray number."
      }
    ],
    "parts": [
      {
        "kind": "facts",
        "title": "This template",
        "rows": [
          [
            "Encoding",
            "GSM-7"
          ],
          [
            "Segments",
            "1"
          ],
          [
            "Numeric code",
            "482913 (6 digits)"
          ],
          [
            "Links found",
            "0"
          ]
        ]
      }
    ],
    "limits": [
      "This previews the text of the template only: it cannot confirm the code actually arrives, or arrives before the person waiting for it gives up, which depends on the carrier and the network on the day, not on the message text.",
      "The link and brand checks only run against a country whose sender ID rule this tool has actually sourced - see the sender ID rules by country table for which countries that is."
    ]
  }
}

Resell phone numbers that receive this kind of message, under your own brand.

Get started

Company names and logos are trademarks of their owners, shown only to identify each service.