OTP SMS Ghana
verification codes you can inspect

Login codes, payment PINs, and account verification for Ghana numbers. POST /v1/verify/send dispatches the SMS; POST /v1/verify/check validates the code your user typed, with hashed storage, cooldown, and a delivery report in your message log.

A woman reading a verification code on her phone
POST /v1/verify/check

Check results

Never a generic success

verified
valid: true
expired
OTP_EXPIRED
invalid
OTP_INVALID
max attempts
OTP_MAX_ATTEMPTS
Codes
Hashed at rest
TEST
Simulated numbers
Queue
Separate from bulk

Verify send, then check.

Two calls. The first answers with an id. The second needs that id and the code your user typed.

  1. 01POST /v1/verify/send dispatches the SMS. Keep the id from the answer.

    cURLPOST /v1/verify/send
    curl -X POST \
      "https://api.taysend.com/v1/verify/send" \
      -H "Authorization: Bearer sms_test_..." \
      -H "Content-Type: application/json" \
      -d '{
        "to": "+233200000001",
        "locale": "en"
      }'

    Answer

    {
      "id": "ver_…",
      "status": "pending",
      "expires_at": "2026-11-18T10:10:00.000Z"
    }
  2. 02POST /v1/verify/check validates the code your user typed. Send that id as verification_id.

    cURLPOST /v1/verify/check
    curl -X POST \
      "https://api.taysend.com/v1/verify/check" \
      -H "Authorization: Bearer sms_test_..." \
      -H "Content-Type: application/json" \
      -d '{
        "verification_id": "ver_…",
        "code": "123456"
      }'

    Answer when the code matches

    {
      "valid": true,
      "status": "verified"
    }

Explicit check outcomes

POST /v1/verify/check answers verified, or an error for expired, invalid, or max attempts. It is never a generic success when the code is wrong.

verifiedHTTP 2xx{ "valid": true, "status": "verified" }
expiredHTTP 400OTP_EXPIREDMessage: Code expired
invalidHTTP 400OTP_INVALIDMessage: Invalid code
max attemptsHTTP 400OTP_MAX_ATTEMPTSMessage: Too many attempts

Security by design

Cooldown and limits

Per-phone send cooldown, max verification attempts, and send-rate limits are enforced server-side, not left to client logic.

30

seconds between codes to one number

5

codes per number each hour

10

minutes until a code expires

5

tries per code, then it locks

  • 01

    Hashed at rest

    Plaintext OTP codes are never stored. Verification compares against a hash so a database leak does not expose active codes.

  • 02

    TEST never hits handset

    sms_test_ keys use simulated numbers. You can exercise the full send-and-check flow without delivering to a real phone.

  • 03

    Inspectable path

    The OTP text uses the same message id and delivery report model as any send. The send answer returns the verification id, not the message id, so find the text in your message log, or list it with GET /v1/messages, to see whether it was delivered, failed, or expired.

OTP vs bulk SMS

OTP is for one-to-one verification with short-lived codes. Bulk SMS is for campaigns to many recipients via lists or the recipients array. They use different queues so neither starves the other.

See bulk SMS

for marketing blasts

Dedicated queue

OTP traffic routes separately from bulk campaigns so a large marketing blast does not delay login codes.

OTP queue
One-to-one, short-lived codes
Bulk queue
Campaigns to many recipients

Straight answers

If something here is product behaviour, it matches the dashboard and the API.

  1. 01

    What endpoints do I use for OTP?

    POST /v1/verify/send to dispatch a code, POST /v1/verify/check to validate it. Both require Bearer authentication.

  2. 02

    Can I use OTP in TEST mode?

    Yes. TEST keys send to simulated numbers only. The verify/check flow works the same way without touching a real handset.

  3. 03

    Do I need a sender ID for OTP?

    Pass sender_id to send codes from your own approved sender ID (3 to 11 characters). Without it, codes come from TAYSEND. TEST uses the sandbox sender TAYSEND.

  4. 04

    Should I log OTP codes in my app?

    No. Never log plaintext codes. Use the check endpoint and handle expired or max-attempt responses in your UI.

Send and check, with the real error codes.

POST /v1/verify/send to dispatch a code, POST /v1/verify/check to validate it. Both require Bearer authentication.

OTP referenceCreate account