An OTP message has one job: get the user from your login screen to the next step, in seconds, without confusion. Yet many OTP messages bury the code in the middle of a paragraph, forget to say which app it is for, or never mention how long the code lasts.

This guide covers the wording, length and expiry that make OTP messages work — including the exact placeholders the Pak Sender verification API supports.

What a good OTP message looks like

The best OTP messages follow the same pattern: code first, app name second, expiry third, and a short security warning last. Here is the example message from the Pak Sender verification API:

"482913 is your verification code for MyApp. It is valid for 5 minutes. Do not share this code with anyone."

The code comes first because it is what the user is looking for — on most phones it is also the part that appears in the notification preview. The app name tells the user the code is genuinely for your service and not a phishing attempt. The expiry sets expectations so the user does not type in a dead code five minutes later. And the warning reminds them never to share it, which protects both the user and your business.

The three placeholders: {code}, {app}, {minutes}

When you start a managed verification through the Pak Sender API, you can supply a custom template with three placeholders that are filled in automatically:

  • {code} — the verification code itself (4–8 digits, default 6).
  • {app} — your app name, taken from the app_name field (the API also accepts brand as an alias).
  • {minutes} — the code's lifetime in minutes, matching the expire_time you set.

For example, a template of "{code} is your verification code for {app}. It is valid for {minutes} minutes. Do not share this code with anyone." produces exactly the message shown above. If you send your own code instead, the /v1/verifications/send endpoint wraps it in the same standard wording automatically, or you can supply a full custom message.

Length: how SMS parts change your cost

OTP messages are short, which is good — because SMS is billed by the part, and parts depend on length and character set:

Character setOne partPer part in long messages
GSM-7 (English)160 characters153 characters
Unicode (Urdu, Arabic, emoji)70 characters67 characters

A typical OTP message in English is well under 160 characters, so it costs one part — Rs 4.30 on Pak Sender. But one Unicode character switches the whole message to Unicode, dropping the single-part limit to 70 characters. An emoji, an Urdu word, or even a curly quote can quietly push a message from one part to two. Certain characters — ^ { } \ [ ] ~ | € — also count as two in standard text, so keep templates plain. Keep the template short, in plain English, and test the part count before launch — the API tester is a quick way to check what a real send looks like.

Expiry: how long should a code live?

Expiry is a balance between security and usability. Too short, and users on slow networks fail before they can type the code. Too long, and a code that falls into the wrong hands stays useful. In practice, most apps use a window of 2–5 minutes for OTP codes. The Pak Sender verification API defaults to 10 minutes and lets you set any value from 1 to 30 minutes with the expire_time parameter (aliases ttl_minutes and expiry_minutes are also accepted). Whatever you choose, state it in the message itself using the {minutes} placeholder, and show a countdown on your verification screen so the user knows when to request a new code. When a code does expire, the verify call returns a CODE_EXPIRED error — handle it by offering a fresh code, not by asking the user to retry the old one.

What NOT to put in an OTP message

  • Links. A link in an OTP message looks exactly like a phishing SMS. Never include one — and never ask the user to click anything to verify.
  • Marketing copy. The OTP message is not a place for offers, slogans or cross-promotion. Every extra word is a distraction and a potential extra SMS part.
  • Personal details. Do not include the user's name, account number or anything else an attacker could use. The code and the app name are enough.
  • Ambiguous wording. "Your code is ready" without the code, or a code buried after three sentences of preamble, wastes the user's time and the notification preview.
  • Requests to reply. Never ask the user to reply to the message with the code or with anything else — OTP verification happens in your app, not by SMS reply.
  • Emoji and non-English characters. One Unicode character halves your single-part limit from 160 to 70 characters. Keep OTP templates in plain GSM-7 English.

Template examples that work

Here are three templates that follow the rules above. All fit comfortably in one SMS part in English:

  • Standard: "{code} is your verification code for {app}. It is valid for {minutes} minutes. Do not share this code with anyone."
  • Short: "Your {app} code is {code}. Valid for {minutes} minutes. Never share it."
  • Login-specific: "{code} is your {app} login code. Valid for {minutes} minutes. Do not share this code with anyone."

Pick one pattern and use it consistently across your product, so users learn to recognise your OTP messages at a glance. For the integration side — starting verifications, choosing a channel and handling errors — see the API documentation and our guide to adding OTP verification to your website or app. If your codes are not arriving at all, the problem is usually delivery, not wording — see our guide on improving SMS delivery rates.

Frequently asked questions

What should an OTP message say?

Put the code first, then the app name, then how long the code is valid, then a short warning not to share it. For example: "482913 is your verification code for MyApp. It is valid for 5 minutes. Do not share this code with anyone." Keep it short, plain and free of links or marketing.

How long should an OTP code be valid for?

Most apps use 2–5 minutes. The Pak Sender API defaults to 10 minutes and allows 1–30 minutes via expire_time. Always state the expiry in the message itself with the {minutes} placeholder so the user knows how long they have.

Why did my OTP message cost two SMS parts?

Most likely a Unicode character. One emoji, Urdu character or curly quote switches the whole message to Unicode, where a single part is 70 characters instead of 160. Keep OTP templates in plain English GSM-7 characters to stay at one part.

Can I customise the OTP message template?

Yes. The verification API accepts a template with {code}, {app} and {minutes} placeholders. If you send your own code, the send endpoint wraps it in the standard wording or accepts a full custom message.