SMS Verification API for Developers: Getting Started
Table of contents
If you are testing your app's sign-up flow or automating verification, the API lets you do everything the panel does without opening it.
Before you start
Get your key from the API page in your panel. Don't commit the key to your code repository; keep it in an environment variable.
Basic flow
- Fetch the list of services and countries.
- Buy a number.
- Poll the status at intervals or use a webhook.
- Complete the activation when the code arrives; cancel it if it doesn't.
Things to keep in mind
- On retries, send an
Idempotency-Keyheader. If you retry with the same key after a network error, a second number won't be bought. - Respect the rate limit; don't shorten the polling interval unnecessarily.
- Handle the insufficient balance and out of stock responses separately in your code.
If your software uses the SMS-Activate compatible protocol, you can connect through the compatible endpoints without changing your code. All the details are in the API documentation.
Verify without sharing your real number
See prices
One-time numbers for hundreds of services; refunded if no code arrives.