OtpGet Reseller API Guide: Your First Integration in Minutes
If you sell verification numbers — through a Telegram bot, an SMS store or your own panel — doing it by hand does not scale. The OtpGet reseller API lets your software order numbers, poll for codes and manage rentals and temp email automatically, with a single API key. This guide walks through your first integration, from key to first code.
What the API Covers
One key works across five endpoints: temp SMS numbers, cheap numbers, premium numbers (SMS and call verification), rentals and temporary email. Prices and balances are in PKR by default, with an optional currency parameter to see converted amounts. Your wallet is always charged in PKR.
| Service | Endpoint |
|---|---|
| Temp numbers (SMS OTP) | /stubs/handler_api.php |
| Cheap numbers | /stubs/cheap_handler.php |
| Premium (SMS & call) | /stubs/premium-handler.php |
| Rentals | /stubs/rental-handler.php |
| Email OTP | /stubs/email-handler.php |
Step 1: Get Your API Key
Create an OtpGet account, then open the API Tool (or Profile) in your dashboard to view your key. Two things to know before your first call: the account that owns the key must have a verified email address and a phone number, or every call is refused with ACCOUNT_NOT_VERIFIED. And treat the key like a password — store it in an environment variable, never in public code.
Step 2: Test Free With a Sandbox Key
Before spending anything, generate a Sandbox Key in the API Tool — it starts with sbx_. Use it in place of your real key and everything else stays the same: same URLs, same parameters, same reply formats. You get a virtual balance of 5000 PKR, fake numbers, and a code about 10 seconds after purchase. Swap to the real key when you go live — that is the only change. Every sandbox reply carries an X-Sandbox: 1 header so you can tell test traffic apart.
Step 3: The Order Flow
The typical flow has five calls:
getCountries— list countries and live prices (JSON).getServices— list services for a country, with prices (JSON).getNumber— order a number. The reply is plain text:ACCESS_NUMBER:order_id:phone:price.getStatus— poll with the order id until the reply starts withSTATUS_OK, followed by the code. Poll every few seconds.setStatus— finish with status 6, or cancel with status 8 for a refund.
Note the mixed formats: the SMS OTP API replies in plain text for balance, number, status and set-status calls, and in JSON for the listing calls. Check each action's example in the full documentation before parsing. Rental and email endpoints always reply in JSON with a status field.
Step 4: Handle the Errors That Matter
Build for these from day one: BAD_KEY (wrong or missing key), NO_BALANCE (top up before busy hours and keep a buffer), ACCOUNT_NOT_VERIFIED (finish account verification once), and the cancel rules — a cancel is refused in the first 2 minutes, and an order that never completes is cancelled and refunded after 20 minutes. The sandbox lets you rehearse failures with scenario=no_numbers, low_balance or no_code on a buy request.
Step 5: Price, Then Scale
Your API prices already include any discount set on your account, so the price you receive is the price you are charged. Set your retail markup to cover payment fees, refunds and support time, and never sell below cost. When the flow works end to end, connect it to your sales channel — bot, store or panel — and let the API do the rest.
Frequently Asked Questions
Do I need coding skills to use the API?
Basic scripting is enough. Every action is a simple GET request, and the docs include copy-paste examples in PHP, Python and cURL.
Can I test without spending money?
Yes. Sandbox keys (sbx_) give you a virtual 5000 PKR balance and fake numbers. Nothing you do in the sandbox touches your real balance.
How do I know the code has arrived?
Poll getStatus with your order id. While waiting you get a waiting reply; when the code arrives the reply starts with STATUS_OK followed by the code.
What if my customer never receives the code?
Cancel with setStatus status 8 and the amount is refunded to your wallet. Orders that never complete are refunded automatically after 20 minutes.