Welcome to VaraSMS

Virtual Number Made Easy

Developer API

Powerful API for Virtual Number Automation

Connect VaraSMS to your apps, bots and systems with fast, secure and scalable endpoints built for developers.

Fast Response Secure Access Global Services Easy Integration
Example Request
GET /api/balance
Host: api.varasms.com
Authorization: Bearer YOUR_API_KEY

{
  "status": "success",
  "balance": "125.50"
}
200 OK
JSON Ready
API Documentation

Powerful Endpoints for Automation & Integration

Connect your apps, bots and systems with secure VaraSMS endpoints. Simple requests, fast responses and scalable performance.

GET

Get Balance

/stubs/handler_api.php?action=getBalance&api_key=YOUR_KEY
Returns your wallet balance instantly.
GET

Purchase Number

/stubs/handler_api.php?action=getNumber&api_key=YOUR_KEY&service=ID&country=ID
Buy a number for selected service and country.
GET

Get Status

/stubs/handler_api.php?action=getStatus&api_key=YOUR_KEY&id=ACTIVATION_ID
Check OTP or activation progress.
GET

Set Status

/stubs/handler_api.php?action=setStatus&api_key=YOUR_KEY&id=ID&status=8
Cancel activation or request another SMS.
GET

Get Countries

/stubs/handler_api.php?action=getCountries&api_key=YOUR_KEY
Fetch all available countries.
GET

Get Services

/stubs/handler_api.php?action=getServices&api_key=YOUR_KEY&country=ID
List all services available for selected country.
Quick Start

Start Integrating in 3 Simple Steps

Get your API key, make your first request and start automating virtual number purchases instantly.

01

Create Account

Register on VaraSMS and access your dashboard to generate your personal API key.

02

Send Request

Use a simple GET request to access balance, countries, services or buy numbers.

GET /stubs/handler_api.php?action=getBalance&api_key=YOUR_KEY
03

Receive JSON

Responses are structured and easy to parse in any language like PHP, Python or JavaScript.

{"status":"success","balance":"120.00"}
Code Examples

Integrate Using Your Favorite Language

VaraSMS API works with any language that can send HTTP requests. Use these starter examples to begin quickly.

PHP Example
$url = "https://api.varasms.com/stubs/handler_api.php?action=getBalance&api_key=YOUR_KEY";
$response = file_get_contents($url);
echo $response;
Python Example
import requests

url = "https://api.varasms.com/stubs/handler_api.php?action=getBalance&api_key=YOUR_KEY"
response = requests.get(url)

print(response.text)
JavaScript Example
fetch("https://api.varasms.com/stubs/handler_api.php?action=getBalance&api_key=YOUR_KEY")
  .then(res => res.text())
  .then(data => console.log(data));
cURL Example
curl "https://api.varasms.com/stubs/handler_api.php?action=getBalance&api_key=YOUR_KEY"
Response Codes

Understand Every API Response Instantly

Use these common response codes to handle success, waiting states and errors inside your applications.

Success Responses

  • ACCESS_NUMBER Number purchased successfully
  • STATUS_OK OTP received successfully
  • BALANCE Wallet balance returned

Pending Responses

  • STATUS_WAIT_CODE Waiting for OTP code
  • STATUS_WAIT_RETRY Retry available soon
  • STATUS_WAIT_RESEND Waiting to resend SMS

Error Responses

  • NO_NUMBERS No stock available
  • BAD_KEY Invalid API key
  • NO_BALANCE Insufficient funds
  • BAD_ACTION Unknown request action
Rate Limits & Security

Built for Scale, Protected by Design

VaraSMS API is optimized for reliable performance while protecting systems and accounts with secure best practices.

Rate Limits

  • Recommended pacing for stable requests
  • Avoid rapid repeated polling loops
  • Use retry delays for waiting statuses
  • Queue requests for bulk automation
  • Contact support for high-volume needs

Security Best Practices

  • Keep your API key private
  • Use server-side requests whenever possible
  • Rotate keys if exposed publicly
  • Use HTTPS encrypted connections
  • Restrict access to trusted systems
⚡ Optimized Performance
🔒 Secure Requests
📈 Scalable Usage
🌍 Global Access
200 OK
JSON Ready
Start Building Today

Ready to Build with VaraSMS API?

Launch automation faster with secure endpoints, reliable virtual number services and developer-ready infrastructure.

Fast Integration Secure Access Scalable API