Free Numbers Pricing Reviews Feedback Terms & Policy API Docs Blog About
Log in Get Started
0 views 2 min read
Back to Blog
API & Developers

How to Check Servers, Countries and Services with the OtpGet API

How to Check Servers, Countries and Services with the OtpGet API

Before you buy a number you need to know three things: which server to use, which country you want a number from, and which service the number is for. OtpGet exposes each of them as a separate call, which keeps your integration simple and fast.

getServers

OtpGet runs several servers. Each one has its own stock, pricing and speed. Always fetch the list instead of hard-coding it, because servers can be added over time.

https://otpget.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getServers

The reply is JSON. Servers are referred to by name and number, such as Server 1 or Server 2.

getCountries

Pass the server you want and receive a JSON list of countries that currently have numbers on it. This is the call to use for a country dropdown in your own app.

getServices

This returns the apps and websites you can receive codes for, such as Telegram or WhatsApp, with the price for each service. It answers in JSON, for example:

{ "12": "Telegram - 45.00 PKR", "13": "WhatsApp - 60.00 PKR" }

Why this matters for your app

  • You never show customers a service that is out of stock.
  • You always display a price that matches what the API will charge.
  • When we add a new country or service, your app picks it up automatically.

Caching tip

Lists change slowly. Cache them for a minute or two on your side instead of calling them for every visitor. Do not cache getNumber or getStatus, which must always be live.

Combine with getPrice

Once the visitor picks a country and a service, call getPrice to confirm the exact amount, then show a confirm button. Lists first, price second, purchase last.

Start building with OtpGet

Create a free account at otpget.com, copy your API key from the dashboard and open the API documentation. Our support team is available 24/7 if you get stuck.

Tags

#getServers #getCountries #getServices #OtpGet API #virtual number countries
Contact us