SMS OTP Verification API for Ghana
Verify Ghanaian phone numbers for sign-up, login and account recovery with the Nopexo SMS OTP API. Generate, send and check single-use codes.
How it works
Ask Nopexo to send a code
Enable OTP for your project and call POST /v1/otp/send from your backend. Nopexo generates the code, queues an SMS and returns a requestId. For production delivery, use a production API key, an approved sender ID and a funded wallet.
Verify the code on your server
Save the requestId with the session or action you want to verify. When the user enters the code, send the code and requestId to POST /v1/otp/verify. Continue the action only when Nopexo returns verified: true.
Plan for expiry and resends
The default code has six digits and expires after five minutes. Resends replace the previous code. Configure attempt limits, resend cooldowns and a daily spending cap in Verify settings.
Common uses
- Verify a phone number during sign-up
- Check access during login
- Confirm a number for account recovery
Frequently asked questions
- Can I test SMS OTP without sending a text to a phone?
- Yes. A sandbox key returns a testCode so you can test both the send and verify steps. Production responses omit the code, and your API key belongs on your server.
- How much does SMS OTP cost?
- SMS OTP costs GH₵0.030 per segment. A one-segment code costs GH₵0.030, and a two-segment code costs GH₵0.060. Each resend is priced by segment. Checking a code through the API is free.