https://otpget.com/stubs/handler_api.php?api_key=$api_key&action=getBalance
$api_key
- Your API key. (Required)BAD_KEY
- Incorrect API keyhttps://otpget.com/stubs/handler_api.php?action=getNumber&api_key=$api_key&service=$service&country=$country
$api_key
- Your API key. (Required)$service
- Unique Service ID for each service. (Required)$country
- Server ID for the country. (Required)BAD_KEY
- Incorrect API keyNO_NUMBERS
- No numbers available, try again laterNO_BALANCE
- Insufficient balancehttps://otpget.com/stubs/handler_api.php?action=getStatus&api_key=$api_key&id=$id
$api_key
- Your API key. (Required)$id
- Activation ID. (Required)BAD_KEY
- Incorrect API keyNO_ACTIVATION
- No activation foundhttps://otpget.com/stubs/handler_api.php?action=setStatus&api_key=$api_key&id=$id&status=$status
$api_key
- Your API key. (Required)$id
- Activation ID. (Required)$status
- Activation status (8 - cancel activation, 3 - request another SMS). (Required)BAD_KEY
- Incorrect API keyNO_ACTIVATION
- No activation foundhttps://otpget.com/stubs/handler_api.php?action=getCountries&api_key=$api_key
$api_key
- Your API key. (Required)BAD_KEY
- Incorrect API keyhttps://otpget.com/stubs/handler_api.php?action=getServices&api_key=$api_key&country=$country
$api_key
- Your API key. (Required)$country
- Server ID for the country. (Required)BAD_KEY
- Incorrect API keyThe OTPGet.com API empowers developers to integrate secure OTP verification using virtual numbers from over 200 countries, including the USA, India, Brazil, and more. Whether you're building a platform requiring authentication for services like WhatsApp, Telegram, or Gmail, this API offers a reliable, scalable solution. This guide walks you through the key steps to implement OTP verification, optimize your integration, and enhance user privacy.
OTPGet.com’s API stands out for its global reach and developer-friendly features. Here’s why it’s the ideal choice:
These features make OTPGet.com perfect for applications requiring secure, global verification.
Follow these steps to integrate the OTPGet.com API into your application:
Here’s a Python example to fetch a virtual number for OTP verification:
import requests
api_key = "your_api_key_here"
url = "https://otpget.com/stubs/handler_api.php?action=getNumber&api_key=" + api_key + "&service=whatsapp&country=us"
response = requests.get(url)
if response.status_code == 200:
data = response.json()
print(f"Number: {data['number']}, ID: {data['id']}")
else:
print(f"Error: {response.json().get('error', 'Failed to get number')}")
Replace your_api_key_here with your actual API key, and specify the desired service and country.
To ensure a robust integration, follow these best practices:
BAD_KEY or NO_NUMBERS gracefully.These practices enhance security and user satisfaction, especially for global audiences across 200+ countries.
Ready to add secure OTP verification to your application? With OTPGet.com’s API, you can support users in over 200 countries with ease. Sign up for a free API key and explore our comprehensive documentation above.
Get Your API KeyNeed help? Contact our 24/7 support team via WhatsApp or Telegram.