
The short answer: at sign-up, ask for the number, send a code with POST /v1/sms/otp and only mark the number as confirmed when POST /v1/sms/otp/{id}/verify answers valid: true. That way you know the phone really belongs to the person signing up, not to a neighbour, a competitor or a bot. The number can be written with or without the country code, because the system can tell the country from the first digit: 841234567 goes to Mozambique and 923456789 to Angola. So +258 84 123 4567 and 258841234567 are the same number as 841234567.
The flow, step by step
|
|
|
|
|
|
The fields that matter at sign-up
| Field | Suggested for sign-up | Limits |
| number | The number the customer typed, as it is | Mobile numbers in Mozambique and Angola |
| length | 6, the default: easy to type, hard to guess | 4 to 8 digits |
| expires_in | 5 to 10 minutes: the customer is right there, waiting | 1 to 60 minutes |
| max_attempts | 3 to 5 | 1 to 10 |
| text | Your service name, {code} and “Do not share it” | Up to 300 characters |
| sender | Your Sender ID, if you have one | Approved for the number's country |
Create the account before or after the code?
Both work. If you create the account straight away, keep it in a “number not confirmed” state and hold back anything that depends on the phone. If you create it only after the code, keep the form data in the session until valid: true. What you should never do is treat the number as confirmed just because the SMS went out.
| Answer the same way whether or not an account exists for that number. A message such as “This number is already registered” tells anyone who your customers are. Prefer “If the number is valid, you will get a code” and deal with existing accounts after the code is confirmed. |
| Test the whole flow in the Sandbox before opening sign-up to the public: the send response includes the code, so you can try the right code, a wrong one and an expired one without using credits. |
|
Want to confirm the number of everyone who signs up on your site or app? See Verification SMS. See Verification SMS |
RECOMMENDED PRODUCT Web hosting with cPanel Domain and SSL included, daily backups and the panel you already know. from ₦9.900,00/mo (3-year plan, with coupon) See plans |











