Getting startedREST · JSON · HTTPS

Test mode: the DiOTP OTP sandbox

Every new account starts in test mode: free test messages, real codes, real API responses, and one rule. Codes go only to the number you verified at sign-up.

Many APIs give you a sandbox that pretends to send. DiOTP does not. Test mode is the real API with one restriction, so the code you write and the responses you handle are exactly what you will see in production. You build against it, prove the full send and verify flow on your own phone, and go live with the same keys.

What you get in test mode

  • Free test messages. The dashboard shows how many are left.
  • API keys, webhooks, usage and the full dashboard, the same as a live account.
  • Real SMS codes delivered to your phone, with real request ids, expiry and attempt counting.
  • The same rate limits as live sending, so your resend timer and error handling get tested too.

Codes go only to your verified number

While your account is in test mode, the only destination allowed is the mobile number you verified when you signed up, with its country code. Send to anything else and the API answers before sending:

Response 403
{
  "error": {
    "code": "trial_restricted",
    "message": "while your account is in trial you can only send to the number you signed up with",
    "request_id": "3f1c9a0e5b7d4e2a8c6f1b0d9e8a7c6b"
  }
}

This keeps a new account from being used to text strangers before we know who is behind it. Pass your number as the 10-digit mobile number with country_code 91.

When the free messages run out

Each test message that is sent uses one of your free messages. Requests refused by a limit or an error do not use any. When none are left, sends return:

Response 402
{
  "error": {
    "code": "trial_used_up",
    "message": "your free test messages are used up; ask to go live to keep sending",
    "request_id": "3f1c9a0e5b7d4e2a8c6f1b0d9e8a7c6b"
  }
}

Verifying is always free, so you can still verify codes you already sent. The full list of codes is on API error codes.

Check your status with GET /v1/me

Your code can ask which state the account is in. Call GET /v1/me with your API key and read client.status:

cURL
curl https://api-diotp.diorbit.com/v1/me \
  -H "Authorization: Bearer $DIOTP_API_KEY"
client.statusWhat it means
trialTest mode. Codes go only to your verified number.
pending_reviewYou asked to go live and we are checking your business. Test mode rules still apply.
liveApproved. Sends go to any number and are paid from your wallet.
suspendedSending is paused. Sends return 403 account_suspended; contact support.

A live account can also switch back to test mode from the dashboard while you try out a change. Sends are then free and limited to your own number again, up to a daily allowance shown in the dashboard; past it, sends return 429 test_limit. The status from GET /v1/me stays live in that case, so check the dashboard to see which mode you are in.

Going live with the same keys

Ask to go live from Account in the dashboard. Your status moves to pending_review while we check your business details, then to live. Nothing changes in your code: the API key, base URL and requests stay the same, and the restriction to your own number simply stops applying. Live sends are paid from your prepaid wallet, so recharge before you switch real traffic over; a send with too little balance returns 402 insufficient_balance. See pricing.

Not built anything yet? The quickstart walks through your first test send in five minutes.

Test mode: FAQ

No. Test mode sends real codes on the real network to your own verified number, and the API behaves exactly as it will when you are live. What works in test mode works after going live.

Need help integrating?

Our team helps with integration, DLT templates and going live.