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.

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.
01
POST /v1/verify/senddispatches the SMS. Keep theidfrom the answer.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" }02
POST /v1/verify/checkvalidates the code your user typed. Send that id asverification_id.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.
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.
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.
- 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.
- 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.
- 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.
- 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.
Related
Each page answers a different question. They are not copies of this one.
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