AxioAPI

OTP API

Wait for a verification code to arrive and get it back in a single call, with polling and timeouts handled by AxioAPI.

1 endpoints · 1 credit = $0.001. Each endpoint has its own credit cost, listed below. Calls that fail because of a service error are refunded.

API workspace and documentation

AxioAPI Studio · Verify
Free Trial: 10 of 10 left
Select Country for Live SMS — online numbers

Live Carrier Feed from Physical SIM Network:

Select any live number below All real SMS/OTP messages received from mobile carriers are fetched in real-time. You can use these numbers on any platform to verify OTP.

Live Carrier SIM
Online Phone Numbers Live Network
Loading live numbers...
Live Inbox ...
...
Public SMS inbox Auto-checking every 15s

What you can build with the OTP API

The OTP API takes a phone number and returns the code in one request: it waits for a matching SMS on that public number and extracts the 4 to 8 digit code, so your test does not need its own polling loop.

Automate OTP steps in end-to-end tests

After your app sends a code, call the wait endpoint with the number and read the extracted code from the response instead of writing retry logic.

POST /api/v1/verify/wait

Ignore old messages

Pass a since timestamp so only messages received after your test started are considered.

POST /api/v1/verify/wait

Read the sender and full text too

The response includes the sender, the full message and the time it was received, so you can assert on more than the code.

POST /api/v1/verify/wait

How the OTP API works

  1. 1

    Trigger the SMS

    Submit a public number (see the SMS API) in the form you are testing.

  2. 2

    Call verify/wait

    POST /api/v1/verify/wait with the number and, optionally, a since timestamp.

  3. 3

    Use the code

    Read the code field from the response and enter it in your flow. If nothing arrives in time, the call returns without a code.

Try the Verify API with your own account

New accounts receive 200 credits after verification, enough for about 40 calls to "Wait for verification code".

Using Verify

Provide the inbox source and identifier required by the wait operation.

Choose a timeout supported by the endpoint. A timeout means no matching message was received during the wait.

Waiting uses the selected source; it does not create a new phone number or email inbox.

OTP API endpoints and pricing

OpenAPI 3.1 JSON

Select an operation above and open API & Docs for parameters and cURL, JavaScript, Python or PHP examples. The web tool uses your signed-in session; external integrations use a Bearer API key.

Method Endpoint Cost
POST Wait for verification code /api/v1/verify/wait
Helpful?
5 credit / session≈ $0.005

OTP API: frequently asked questions

What does the OTP API do?

It is a verification code API for OTP verification: it waits for an SMS on a given phone number, finds the code in it and returns it with the sender and full message. Use it with the numbers from the receive SMS API, the same flow as an SMS verification API on staging.

Which numbers can I use?

The public numbers listed by the SMS API. Public numbers are shared, so use them for testing only.

What happens if no SMS arrives?

A timeout means no matching message was received while waiting. The call does not create a new number or inbox.

How is it billed?

Per verification session, as shown in the endpoint table below. New accounts receive 200 credits after verification.

Before integrating

Live and example data

Check the Live or Sandbox label before running. Examples demonstrate the response structure and do not guarantee live service status.

Credits and limits

Pricing depends on the endpoint and billable units. Failed live requests are not replaced with billable examples. Check your account limits before running repeated requests.

View pricing

Handling errors

Keep the request ID for troubleshooting. For 429, respect Retry-After when provided. If a create or delete request loses its connection, check the resource state before retrying.

Ready to integrate the Verify API? Create an account and get your API key in minutes.