Compatible API Simple GET requests · Plain text responses

The compatible API lets you integrate VaraSMS virtual numbers into any platform using simple GET requests.

ℹBase URL: https://api.varasms.com/s1/
Append ?api_key=YOUR_KEY to every request.
⚠Get your free API key at dashboard.varasms.com after registering.

Quick Start

01
Get API Key

Register at dashboard.varasms.com and copy your API key.

02
Make a Request

Send a simple GET request with your API key as a query parameter.

03
Parse Response

Responses are plain text strings. Use string functions to extract data.

$res = file_get_contents("https://api.varasms.com/s1/?action=getBalance&api_key=YOUR_KEY");
// Returns: "ACCESS_BALANCE:2347.22"
$balance = explode(":", $res)[1];

Authentication

Pass your API key as a query parameter on every request. No headers needed.

?action=getBalance&api_key=YOUR_KEY

Response Strings

ACCESS_BALANCE:Balance returned — value after colon
ACCESS_NUMBER:Number purchased — ID:PHONE after colon
STATUS_OK:OTP received — code after colon
STATUS_WAIT_CODEWaiting for OTP — keep polling
STATUS_WAIT_RETRYRetry shortly
ACCESS_CANCELNumber cancelled or expired
BAD_KEYInvalid API key
NO_BALANCEInsufficient wallet balance
NO_NUMBERSNo stock available
BAD_ACTIONUnknown action parameter

Get Balance

GEThttps://api.varasms.com/s1/?action=getBalance&api_key=YOUR_KEYGet Balance

Returns your current wallet balance.

Response
ACCESS_BALANCE:2347.22
$res = file_get_contents("https://api.varasms.com/s1/?action=getBalance&api_key=YOUR_KEY");
$balance = explode(":", $res)[1]; // "2347.22"
const res = await fetch("https://api.varasms.com/s1/?action=getBalance&api_key=YOUR_KEY").then(r=>r.text());
const balance = res.split(":")[1];
import requests
res = requests.get("https://api.varasms.com/s1/?action=getBalance&api_key=YOUR_KEY").text
balance = res.split(":")[1]

Get Countries

GEThttps://api.varasms.com/s1/?action=getCountries&api_key=YOUR_KEYGet Countries

Returns all available countries. Use the numeric index as country parameter when buying.

Response
{"0":{"name":"Russia","iso":"ru"},"1":{"name":"Ukraine","iso":"ua"},"2":{"name":"Nigeria","iso":"ng"}}

Get Services

GEThttps://api.varasms.com/s1/?action=getServices&api_key=YOUR_KEY&country=0Get Services

Returns available services for a country with prices and stock count.

ParamTypeDescription
countryintegerrequiredCountry index from getCountries
Response
{"vk":{"name":"VKontakte","cost":"150.00","count":832},"google":{"name":"Google","cost":"200.00","count":421}}

Buy Number

GEThttps://api.varasms.com/s1/?action=getNumber&api_key=YOUR_KEY&service=vk&country=0Buy Number

Purchase a virtual number. Save the activation ID for checking OTP and setting status.

ParamTypeDescription
servicestringrequiredService code (e.g. vk, google, wa)
countryintegerrequiredCountry index from getCountries
Success
ACCESS_NUMBER:12345678:79001234567
# ACCESS_NUMBER:ACTIVATION_ID:PHONE
Errors
NO_BALANCE   # insufficient funds
NO_NUMBERS   # no stock
BAD_KEY      # invalid API key
$res = file_get_contents("https://api.varasms.com/s1/?action=getNumber&api_key=YOUR_KEY&service=vk&country=0");
if (strpos($res, "ACCESS_NUMBER") === 0) {
    [, $id, $phone] = explode(":", $res);
    echo "Phone: +$phone | ID: $id\n";
}
const res = await fetch("https://api.varasms.com/s1/?action=getNumber&api_key=YOUR_KEY&service=vk&country=0").then(r=>r.text());
if (res.startsWith("ACCESS_NUMBER")) {
  const [, id, phone] = res.split(":");
  console.log("Phone:", phone, "ID:", id);
}
import requests
res = requests.get("https://api.varasms.com/s1/?action=getNumber&api_key=YOUR_KEY&service=vk&country=0").text
if res.startswith("ACCESS_NUMBER"):
    _, act_id, phone = res.split(":")
    print(f"Phone: +{phone} | ID: {act_id}")

Check OTP

GEThttps://api.varasms.com/s1/?action=getStatus&api_key=YOUR_KEY&id=ACTIVATION_IDCheck OTP

Poll every 5 seconds after buying. Stop when STATUS_OK or ACCESS_CANCEL is returned.

ParamTypeDescription
idstringrequiredActivation ID from getNumber
Possible Responses
STATUS_WAIT_CODE    # waiting — keep polling every 5s
STATUS_OK:483920    # OTP received — code is 483920
ACCESS_CANCEL       # number cancelled or expired
for ($i = 0; $i < 20; $i++) {
    sleep(5);
    $res = file_get_contents("https://api.varasms.com/s1/?action=getStatus&api_key=YOUR_KEY&id=$id");
    if (strpos($res, "STATUS_OK") === 0) { $otp = explode("STATUS_OK:", $res)[1]; echo "OTP: $otp\n"; break; }
    if ($res === "ACCESS_CANCEL") { echo "Expired\n"; break; }
}
const sleep = ms => new Promise(r => setTimeout(r, ms));
for (let i = 0; i < 20; i++) {
  await sleep(5000);
  const res = await fetch("https://api.varasms.com/s1/?action=getStatus&api_key=YOUR_KEY&id=" + id).then(r=>r.text());
  if (res.startsWith("STATUS_OK")) { console.log("OTP:", res.split("STATUS_OK:")[1]); break; }
  if (res === "ACCESS_CANCEL") { console.log("Expired"); break; }
}
import requests, time
for _ in range(20):
    time.sleep(5)
    res = requests.get("https://api.varasms.com/s1/?action=getStatus&api_key=YOUR_KEY&id=" + act_id).text
    if res.startswith("STATUS_OK"): print("OTP:", res.split("STATUS_OK:")[1]); break
    if res == "ACCESS_CANCEL": print("Expired"); break

Set Status

GEThttps://api.varasms.com/s1/?action=setStatus&api_key=YOUR_KEY&id=ID&status=CODESet Status

Update the activation status.

ParamTypeDescription
idstringrequiredActivation ID
statusintegerrequired3 = request another SMS  ·  6 = confirm done  ·  8 = cancel & refund
Responses
ACCESS_CANCEL      # cancelled + refunded (status=8)
ACCESS_RETRY_GET   # another SMS requested (status=3)
ACCESS_ACTIVATION  # confirmed done (status=6)

Full Flow Example

<?php
define("KEY",  "YOUR_API_KEY");
define("BASE", "https://api.varasms.com/s1/");
function s1($p){ return file_get_contents(BASE."?".http_build_query(array_merge($p,["api_key"=>KEY]))); }

$buy = s1(["action"=>"getNumber","service"=>"vk","country"=>"0"]);
if (strpos($buy,"ACCESS_NUMBER") !== 0) die("Buy failed: $buy");
[,$id,$phone] = explode(":",$buy);
echo "Phone: +$phone\n";

$otp = null;
for($i=0;$i<20;$i++){
    sleep(5);
    $s = s1(["action"=>"getStatus","id"=>$id]);
    if(strpos($s,"STATUS_OK")===0){ $otp=explode("STATUS_OK:",$s)[1]; echo "OTP: $otp\n"; break; }
    if($s==="ACCESS_CANCEL"){ echo "Expired\n"; break; }
}
s1(["action"=>"setStatus","id"=>$id,"status"=>$otp?"6":"8"]);
const KEY="YOUR_API_KEY", BASE="https://api.varasms.com/s1/";
const s1=p=>fetch(BASE+"?"+new URLSearchParams({...p,api_key:KEY})).then(r=>r.text());
const sleep=ms=>new Promise(r=>setTimeout(r,ms));
(async()=>{
  const buy=await s1({action:"getNumber",service:"vk",country:"0"});
  if(!buy.startsWith("ACCESS_NUMBER")){console.error(buy);return;}
  const[,id,phone]=buy.split(":");console.log("Phone:",phone);
  let otp=null;
  for(let i=0;i<20;i++){
    await sleep(5000);
    const s=await s1({action:"getStatus",id});
    if(s.startsWith("STATUS_OK")){otp=s.split("STATUS_OK:")[1];console.log("OTP:",otp);break;}
    if(s==="ACCESS_CANCEL"){console.log("Expired");break;}
  }
  await s1({action:"setStatus",id,status:otp?"6":"8"});
})();
import requests, time
KEY="YOUR_API_KEY"; BASE="https://api.varasms.com/s1/"
def s1(p): return requests.get(BASE,params={**p,"api_key":KEY}).text
buy=s1({"action":"getNumber","service":"vk","country":"0"})
if not buy.startswith("ACCESS_NUMBER"): exit("Buy failed: "+buy)
_,act_id,phone=buy.split(":")
print(f"Phone: +{phone}")
otp=None
for _ in range(20):
    time.sleep(5)
    s=s1({"action":"getStatus","id":act_id})
    if s.startswith("STATUS_OK"): otp=s.split("STATUS_OK:")[1]; print(f"OTP:{otp}"); break
    if s=="ACCESS_CANCEL": print("Expired"); break
s1({"action":"setStatus","id":act_id,"status":"6" if otp else "8"})

API 2.0 JSON REST API · Full order management · Auto-refund

Full-featured REST API with clean JSON responses, complete order lifecycle, auto-refund on cancel, operator selection and transaction history.

Base URLhttps://api.varasms.com/v1/Auth: ?api_key=YOUR_KEY or X-API-Key header
✓Auto-refund: Cancelling a number with no OTP received automatically refunds your wallet.
⚠Rate limit: 120 requests per minute per API key.

Quick Start

01
Get API Key

Register at dashboard.varasms.com. Same key works for Compatible API and API 2.0.

02
GET or POST

GET for data queries. POST for actions (buy, cancel, finish). Always include api_key.

03
Parse JSON

All responses return {"status":"ok",...} or {"status":"error",...}

Authentication

Query Parameter

GET /v1/?action=balance&api_key=YOUR_KEY

HTTP Header (recommended)

GET /v1/?action=balance
X-API-Key: YOUR_KEY

Status Codes

200 · okSuccess
400 · errorBad request — missing parameter
401 · errorUnauthorized — invalid API key
403 · errorForbidden — account suspended
404 · errorNot found — order not found
429 · errorRate limit — wait 60s
502 · errorProvider error — try again

Get Balance

GEThttps://api.varasms.com/v1/?action=balance&api_key=YOUR_KEYBalance
Response
{"status":"ok","balance":4500.00,"total_deposited":10000.00,"total_otp":42,"currency":"NGN"}

Transaction History

GEThttps://api.varasms.com/v1/?action=transactions&limit=20&page=1&api_key=YOUR_KEYTransactions
ParamTypeDescription
limitintegeroptional1–100, default 20
pageintegeroptionalPage number, default 1
Response
{"status":"ok","total":156,"page":1,"limit":20,"transactions":[{"amount":"-150.00","type":"API Number Purchase","txn_id":"API_ABC123","date":"2026-05-12 14:22:00","status":"1"}]}

Get Countries

GEThttps://api.varasms.com/v1/?action=countries&api_key=YOUR_KEYCountries

Use country_key when buying numbers.

Response
{"status":"ok","count":153,"countries":[{"country_key":"usa","country_name":"United States","iso":"US","prefix":"+1"},{"country_key":"russia","country_name":"Russia","iso":"RU","prefix":"+7"}]}

Get Services

GEThttps://api.varasms.com/v1/?action=services&country=usa&api_key=YOUR_KEYServices
ParamTypeDescription
countrystringrequiredCountry key from /countries
Response
{"status":"ok","country":"usa","count":388,"services":[{"service_code":"tinder","service_name":"Tinder","price":96.98,"currency":"NGN","available":3488},{"service_code":"whatsapp","service_name":"WhatsApp","price":86.40,"currency":"NGN","available":43200}]}

Get Operators NEW

GEThttps://api.varasms.com/v1/?action=operators&country=usa&service=tinder&api_key=YOUR_KEYOperators

Returns all operators for a service sorted by success rate descending. Pass the operator to the buy endpoint for better results.

ParamTypeDescription
countrystringrequiredCountry key (e.g. usa)
servicestringrequiredService code (e.g. tinder)
Response
{"status":"ok","country":"usa","service":"tinder","currency":"NGN","operators":[{"operator":"virtual63","price":108.00,"available":12488,"success_rate":66},{"operator":"virtual51","price":96.98,"available":3488,"success_rate":7}]}

Buy Number

POSThttps://api.varasms.com/v1/?action=buy&api_key=YOUR_KEYBuy Number
ParamTypeDescription
countrystringrequiredCountry key (e.g. usa)
servicestringrequiredService code (e.g. tinder)
operatorstringoptionalOperator from /operators. Omit to auto-select.
Success
{"status":"ok","order_id":"API_VS_12345678","phone":"+19709066149","service":"Tinder","operator":"virtual63","country":"usa","price":108.00,"currency":"NGN","expires":"2026-05-20T15:35:00Z","new_balance":1142.00}
Error
{"status":"error","message":"Insufficient balance. Required: ₦108.00, Available: ₦50.00."}
$ch = curl_init("https://api.varasms.com/v1/?action=buy&api_key=YOUR_KEY");
curl_setopt_array($ch,[CURLOPT_POST=>true,CURLOPT_POSTFIELDS=>http_build_query(["country"=>"usa","service"=>"tinder","operator"=>"virtual63"]),CURLOPT_RETURNTRANSFER=>true]);
$r = json_decode(curl_exec($ch),true);
if ($r["status"]==="ok") echo "Phone: {$r['phone']} | Order: {$r['order_id']}\n";
else echo "Error: {$r['message']}\n";
const r = await fetch("https://api.varasms.com/v1/?action=buy&api_key=YOUR_KEY",{
  method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},
  body:new URLSearchParams({country:"usa",service:"tinder",operator:"virtual63"})
}).then(r=>r.json());
if(r.status==="ok") console.log("Phone:",r.phone,"Order:",r.order_id);
else console.error("Error:",r.message);
import requests
r=requests.post("https://api.varasms.com/v1/?action=buy&api_key=YOUR_KEY",data={"country":"usa","service":"tinder","operator":"virtual63"}).json()
if r["status"]=="ok": print(f"Phone:{r['phone']} | Order:{r['order_id']}")
else: print("Error:",r["message"])

Check OTP

GEThttps://api.varasms.com/v1/?action=check&order_id=ORDER_ID&api_key=YOUR_KEYCheck OTP

Poll every 5 seconds. When waiting is false the order has ended.

ParamTypeDescription
order_idstringrequiredorder_id from the buy response
Waiting
{"status":"ok","sms_code":"","waiting":true}
OTP Received
{"status":"ok","sms_code":"483920","sms_text":"Your code is 483920","waiting":false}
for($i=0;$i<20;$i++){
  sleep(5);
  $r=json_decode(file_get_contents("https://api.varasms.com/v1/?action=check&api_key=YOUR_KEY&order_id=$order_id"),true);
  if(!empty($r["sms_code"])){ echo "OTP:".$r["sms_code"]; break; }
  if(!$r["waiting"]) break;
}
const sleep=ms=>new Promise(r=>setTimeout(r,ms));
for(let i=0;i<20;i++){
  await sleep(5000);
  const r=await fetch("https://api.varasms.com/v1/?action=check&api_key=YOUR_KEY&order_id="+orderId).then(r=>r.json());
  if(r.sms_code){console.log("OTP:",r.sms_code);break;}
  if(!r.waiting) break;
}
import requests,time
for _ in range(20):
  time.sleep(5)
  r=requests.get("https://api.varasms.com/v1/?action=check&api_key=YOUR_KEY&order_id="+order_id).json()
  if r.get("sms_code"):print("OTP:",r["sms_code"]);break
  if not r.get("waiting"):break

Cancel & Refund

POSThttps://api.varasms.com/v1/?action=cancel&api_key=YOUR_KEY · body: order_idCancel

Cancels the order. Wallet auto-refunded if no OTP was received.

Response
{"status":"ok","action":"cancel","refunded":true,"message":"Cancelled successfully. Wallet refunded."}

Mark Done / Report Bad

POSThttps://api.varasms.com/v1/?action=finish or ?action=ban · body: order_id

finish — Mark complete after using the OTP.  |  ban — Report as invalid/not receiving SMS.

finish
{"status":"ok","action":"finish","message":"Finished successfully."}
ban
{"status":"ok","action":"ban","message":"Banned successfully."}

Full Flow Example

<?php
define("KEY","YOUR_API_KEY"); define("BASE","https://api.varasms.com/v1/");
function v1get($a,$p=[]){$p["action"]=$a;$p["api_key"]=KEY;return json_decode(file_get_contents(BASE."?".http_build_query($p)),true);}
function v1post($a,$p=[]){$ch=curl_init(BASE."?action=$a&api_key=".KEY);curl_setopt_array($ch,[CURLOPT_POST=>true,CURLOPT_POSTFIELDS=>http_build_query($p),CURLOPT_RETURNTRANSFER=>true]);$r=curl_exec($ch);curl_close($ch);return json_decode($r,true);}

$ops=v1get("operators",["country"=>"usa","service"=>"tinder"]);
$operator=$ops["operators"][0]["operator"];
$buy=v1post("buy",["country"=>"usa","service"=>"tinder","operator"=>$operator]);
if($buy["status"]!=="ok") die("Buy failed: ".$buy["message"]);
echo "Phone: {$buy['phone']}\n";
$otp=null;
for($i=0;$i<20;$i++){
    sleep(5);
    $chk=v1get("check",["order_id"=>$buy["order_id"]]);
    if(!empty($chk["sms_code"])){$otp=$chk["sms_code"];echo "OTP:$otp\n";break;}
    if(!$chk["waiting"]) break;
}
if($otp) v1post("finish",["order_id"=>$buy["order_id"]]);
else {$c=v1post("cancel",["order_id"=>$buy["order_id"]]);echo $c["refunded"]?"Refunded\n":"Cancelled\n";}
const KEY="YOUR_API_KEY",BASE="https://api.varasms.com/v1/";
const sleep=ms=>new Promise(r=>setTimeout(r,ms));
async function v1get(a,p={}){const u=new URL(BASE);Object.entries({...p,action:a,api_key:KEY}).forEach(([k,v])=>u.searchParams.set(k,v));return fetch(u).then(r=>r.json());}
async function v1post(a,p={}){return fetch(`${BASE}?action=${a}&api_key=${KEY}`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(p)}).then(r=>r.json());}
(async()=>{
  const ops=await v1get("operators",{country:"usa",service:"tinder"});
  const operator=ops.operators[0].operator;
  const buy=await v1post("buy",{country:"usa",service:"tinder",operator});
  if(buy.status!=="ok"){console.error(buy.message);return;}
  console.log("Phone:",buy.phone);
  let otp=null;
  for(let i=0;i<20;i++){
    await sleep(5000);
    const chk=await v1get("check",{order_id:buy.order_id});
    if(chk.sms_code){otp=chk.sms_code;console.log("OTP:",otp);break;}
    if(!chk.waiting) break;
  }
  if(otp) await v1post("finish",{order_id:buy.order_id});
  else{const c=await v1post("cancel",{order_id:buy.order_id});console.log(c.refunded?"Refunded":"Cancelled");}
})();
import requests,time
KEY="YOUR_API_KEY";BASE="https://api.varasms.com/v1/"
def v1get(a,p=None):return requests.get(BASE,params={**(p or{}),"action":a,"api_key":KEY}).json()
def v1post(a,p=None):return requests.post(f"{BASE}?action={a}&api_key={KEY}",data=p or{}).json()

ops=v1get("operators",{"country":"usa","service":"tinder"})
operator=ops["operators"][0]["operator"]
buy=v1post("buy",{"country":"usa","service":"tinder","operator":operator})
if buy["status"]!="ok":exit("Buy failed:"+buy["message"])
print(f"Phone:{buy['phone']}")
otp=None
for _ in range(20):
    time.sleep(5)
    chk=v1get("check",{"order_id":buy["order_id"]})
    if chk.get("sms_code"):otp=chk["sms_code"];print("OTP:",otp);break
    if not chk.get("waiting"):break
if otp:v1post("finish",{"order_id":buy["order_id"]})
else:
    c=v1post("cancel",{"order_id":buy["order_id"]})
    print("Refunded" if c["refunded"] else "Cancelled")

Rental API Long-term numbers · Full Number & Service Rental · Unlimited SMS

Rent real SIM numbers for days, weeks or months. Two types: Full Number (all services) or Service Rental (dedicated to one app).

Base URLhttps://api.varasms.com/v2/Auth: ?api_key=YOUR_KEY or X-API-Key header
💡Two rental types:
• Full Number — receive SMS from any service
• Service Rental — dedicated to one specific app
⚠Rate limit: 30 requests per minute. No refunds on rental cancellations.

Integration Flows

Full Number Rental

1
Get rental countries
GET rental_countries?type=full
2
Get available plans
GET rental_durations?country=Germany
3
Rent the number
POST rent_number (product_id)
4
Poll for SMS every 30s
GET rental_status?rental_id=87

Service Rental

1
Get rental countries
GET rental_countries?type=service
2
Get available services
GET rental_services?country=Germany
3
Get plans for service
GET rental_service_plans?country=Germany&service=WhatsApp
4
Rent the service number
POST rent_service (product_id)
5
Poll for SMS every 30s
GET rental_status?rental_id=88

Authentication

GET /v2/?action=rental_countries&api_key=YOUR_KEY
GET /v2/?action=rental_countries
X-API-Key: YOUR_KEY

rental_countries

GEThttps://api.varasms.com/v2/?action=rental_countries&type=full&api_key=YOUR_KEY
ParamTypeDescription
typestringoptionalall (default) | full | service
Response
{"status":"ok","type":"full","countries":["Germany","UnitedKingdom","CzechRepublic"],"total":12}

rental_durations

GEThttps://api.varasms.com/v2/?action=rental_durations&country=Germany&api_key=YOUR_KEY
ParamTypeDescription
countrystringrequiredCountry name from rental_countries
Response
{"status":"ok","country":"Germany","plans":[{"product_id":97629,"duration":"1 month","price":55200.00,"currency":"NGN","available":999},{"product_id":97630,"duration":"1 week","price":14400.00,"currency":"NGN","available":999}],"note":"Pass product_id to rent_number."}

rent_number

POSThttps://api.varasms.com/v2/?action=rent_number&api_key=YOUR_KEY

Rent a full number. Wallet is deducted. Save rental_id.

ParamTypeDescription
product_idintegerrequiredProduct ID from rental_durations
auto_renewintegeroptionalSend 1 to auto-renew on expiry
Response
{"status":"ok","rental_id":87,"phone":"+447735327628","country":"Germany","type":"Full Number Rental","duration":"1 month","expires_at":"2026-06-20 15:00:00","price":55200.00,"currency":"NGN","new_balance":8800.00}
$ch=curl_init("https://api.varasms.com/v2/?action=rent_number&api_key=YOUR_KEY");
curl_setopt_array($ch,[CURLOPT_POST=>true,CURLOPT_POSTFIELDS=>"product_id=97629",CURLOPT_RETURNTRANSFER=>true]);
$r=json_decode(curl_exec($ch),true);
if($r["status"]==="ok") echo "Phone:{$r['phone']} | Rental:{$r['rental_id']} | Expires:{$r['expires_at']}\n";
else echo "Error:{$r['message']}\n";
const r=await fetch("https://api.varasms.com/v2/?action=rent_number&api_key=YOUR_KEY",{
  method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},
  body:new URLSearchParams({product_id:97629})
}).then(r=>r.json());
if(r.status==="ok") console.log("Phone:",r.phone,"Rental:",r.rental_id);
import requests
r=requests.post("https://api.varasms.com/v2/?action=rent_number&api_key=YOUR_KEY",data={"product_id":97629}).json()
if r["status"]=="ok": print(f"Phone:{r['phone']} | Rental:{r['rental_id']}")

rental_services

GEThttps://api.varasms.com/v2/?action=rental_services&country=Germany&api_key=YOUR_KEY
ParamTypeDescription
countrystringrequiredCountry name from rental_countries
Response
{"status":"ok","country":"Germany","services":["WhatsApp","Telegram","Google, Gmail, Youtube","Tinder"],"total":14}

rental_service_plans

GEThttps://api.varasms.com/v2/?action=rental_service_plans&country=Germany&service=WhatsApp&api_key=YOUR_KEY
ParamTypeDescription
countrystringrequiredCountry name
servicestringrequiredService name from rental_services
Response
{"status":"ok","country":"Germany","service":"WhatsApp","plans":[{"product_id":101,"duration":"1 day","price":960.00,"currency":"NGN","available":50},{"product_id":102,"duration":"7 days","price":5760.00,"currency":"NGN","available":50}]}

rent_service

POSThttps://api.varasms.com/v2/?action=rent_service&api_key=YOUR_KEY
ParamTypeDescription
product_idintegerrequiredProduct ID from rental_service_plans
auto_renewintegeroptionalSend 1 to auto-renew
Response
{"status":"ok","rental_id":88,"phone":"+49176123456","service":"WhatsApp","country":"Germany","type":"Service Rental","duration":"1 day","expires_at":"2026-05-21 15:00:00","price":960.00,"currency":"NGN","new_balance":7840.00}

rental_status

GEThttps://api.varasms.com/v2/?action=rental_status&rental_id=87&api_key=YOUR_KEY

Poll every 30 seconds. Returns all received SMS messages.

ParamTypeDescription
rental_idintegerrequiredrental_id from rent_number or rent_service
Response
{"status":"ok","rental_id":87,"phone":"+447735327628","status":"active","expires_at":"2026-06-20 15:00:00","sms_count":2,"sms":[{"sender":"Tinder","message":"Your code is 889051","received_at":"2026-05-20 10:34:00"},{"sender":"Google","message":"G-482910 is your code","received_at":"2026-05-20 11:02:00"}]}
$seen=[];
while(true){
    sleep(30);
    $r=json_decode(file_get_contents("https://api.varasms.com/v2/?action=rental_status&rental_id=$rental_id&api_key=YOUR_KEY"),true);
    if($r["status"]!=="active") break;
    foreach($r["sms"] as $sms){
        $key=$sms["received_at"].$sms["sender"];
        if(!isset($seen[$key])){echo "From {$sms['sender']}: {$sms['message']}\n";$seen[$key]=true;}
    }
}
const sleep=ms=>new Promise(r=>setTimeout(r,ms));const seen=new Set();
while(true){
  await sleep(30000);
  const r=await fetch("https://api.varasms.com/v2/?action=rental_status&rental_id=87&api_key=YOUR_KEY").then(r=>r.json());
  if(r.status!=="active") break;
  for(const sms of r.sms){const k=sms.received_at+sms.sender;if(!seen.has(k)){console.log(`From ${sms.sender}:`,sms.message);seen.add(k);}}
}
import requests,time
seen=set()
while True:
    time.sleep(30)
    r=requests.get("https://api.varasms.com/v2/",params={"action":"rental_status","rental_id":87,"api_key":"YOUR_KEY"}).json()
    if r["status"]!="active": break
    for sms in r["sms"]:
        k=sms["received_at"]+sms["sender"]
        if k not in seen: print(f"From {sms['sender']}: {sms['message']}"); seen.add(k)

my_rentals

GEThttps://api.varasms.com/v2/?action=my_rentals&status=active&api_key=YOUR_KEY
ParamTypeDescription
statusstringoptionalactive | expired | cancelled | all
limitintegeroptional1–50, default 20
Response
{"status":"ok","rentals":[{"rental_id":87,"phone":"+447735327628","country":"Germany","type":"RentalFull","status":"active","expires_at":"2026-06-20 15:00:00","price":55200.00,"currency":"NGN"}],"total":1}

cancel_rental

POSThttps://api.varasms.com/v2/?action=cancel_rental&api_key=YOUR_KEY
⚠No refunds on rental cancellations.
ParamTypeDescription
rental_idintegerrequiredRental ID
Response
{"status":"ok","rental_id":88,"status":"cancelled","note":"No refunds on rental cancellations."}

Full Flow Example

<?php
define("KEY","YOUR_API_KEY");define("BASE","https://api.varasms.com/v2/");
function v2get($a,$p=[]){$p["action"]=$a;$p["api_key"]=KEY;return json_decode(file_get_contents(BASE."?".http_build_query($p)),true);}
function v2post($a,$p=[]){$ch=curl_init(BASE."?action=$a&api_key=".KEY);curl_setopt_array($ch,[CURLOPT_POST=>true,CURLOPT_POSTFIELDS=>http_build_query($p),CURLOPT_RETURNTRANSFER=>true]);$r=curl_exec($ch);curl_close($ch);return json_decode($r,true);}

$plans=v2get("rental_durations",["country"=>"Germany"]);
$plan=$plans["plans"][0];
$rent=v2post("rent_number",["product_id"=>$plan["product_id"]]);
if($rent["status"]!=="ok") die("Rent failed:".$rent["message"]);
$rental_id=$rent["rental_id"];
echo "Phone:{$rent['phone']} | Rental:$rental_id\n";
$seen=[];
for($i=0;$i<10;$i++){
    sleep(30);
    $s=v2get("rental_status",["rental_id"=>$rental_id]);
    if($s["status"]!=="active") break;
    foreach($s["sms"] as $sms){$key=$sms["received_at"].$sms["sender"];if(!isset($seen[$key])){echo "SMS from {$sms['sender']}:{$sms['message']}\n";$seen[$key]=true;}}
}
const KEY="YOUR_API_KEY",BASE="https://api.varasms.com/v2/";
const sleep=ms=>new Promise(r=>setTimeout(r,ms));
async function v2get(a,p={}){const u=new URL(BASE);Object.entries({...p,action:a,api_key:KEY}).forEach(([k,v])=>u.searchParams.set(k,v));return fetch(u).then(r=>r.json());}
async function v2post(a,p={}){return fetch(`${BASE}?action=${a}&api_key=${KEY}`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(p)}).then(r=>r.json());}
(async()=>{
  const plans=await v2get("rental_service_plans",{country:"Germany",service:"WhatsApp"});
  const plan=plans.plans[0];
  const rent=await v2post("rent_service",{product_id:plan.product_id});
  if(rent.status!=="ok"){console.error(rent.message);return;}
  console.log("Phone:",rent.phone,"Rental:",rent.rental_id);
  const seen=new Set();
  for(let i=0;i<20;i++){
    await sleep(30000);
    const s=await v2get("rental_status",{rental_id:rent.rental_id});
    if(s.status!=="active") break;
    for(const sms of s.sms){const k=sms.received_at+sms.sender;if(!seen.has(k)){console.log(`From ${sms.sender}:`,sms.message);seen.add(k);}}
  }
})();
import requests,time
KEY="YOUR_API_KEY";BASE="https://api.varasms.com/v2/"
def v2get(a,p=None):return requests.get(BASE,params={**(p or{}),"action":a,"api_key":KEY}).json()
def v2post(a,p=None):return requests.post(f"{BASE}?action={a}&api_key={KEY}",data=p or{}).json()

plans=v2get("rental_service_plans",{"country":"Germany","service":"WhatsApp"})
plan=plans["plans"][0]
rent=v2post("rent_service",{"product_id":plan["product_id"]})
if rent["status"]!="ok":exit("Rent failed:"+rent["message"])
rental_id=rent["rental_id"]
print(f"Phone:{rent['phone']} | Rental:{rental_id}")
seen=set()
for _ in range(20):
    time.sleep(30)
    s=v2get("rental_status",{"rental_id":rental_id})
    if s["status"]!="active":break
    for sms in s["sms"]:
        k=sms["received_at"]+sms["sender"]
        if k not in seen:print(f"From {sms['sender']}:{sms['message']}");seen.add(k)

USA / Canada API Server 3 · Real US & CA numbers · JSON REST · Auto-refund

Buy real United States and Canada verification numbers for 200+ services. Clean JSON, full order lifecycle, automatic wallet refund when no OTP arrives. Same API key as the other APIs.

Base URLhttps://api.varasms.com/v3/Auth: ?api_key=YOUR_KEY or X-API-Key header
✓Auto-refund: If a number is cancelled or expires with no OTP received, your wallet is refunded automatically.
⚠Server 3 covers United States and Canada only. Numbers are auto-assigned — no operator selection needed. Rate limit: 120 requests per minute.

Quick Start

01
Get API Key

Register at dashboard.varasms.com. The same key works across all VaraSMS APIs.

02
Pick US or CA

Use country=usa or country=canada. List services, then buy.

03
Poll for OTP

Poll check every 5s. When waiting is false the order has ended.

Authentication

Query Parameter

GET /v3/?action=balance&api_key=YOUR_KEY

HTTP Header (recommended)

GET /v3/?action=balance
X-API-Key: YOUR_KEY

Get Balance

GEThttps://api.varasms.com/v3/?action=balance&api_key=YOUR_KEYBalance
Response
{"status":"ok","balance":4500.00,"total_deposited":10000.00,"total_otp":42,"currency":"NGN"}

Get Countries

GEThttps://api.varasms.com/v3/?action=countries&api_key=YOUR_KEYCountries

Server 3 supports two countries. Use country_key when buying.

Response
{"status":"ok","count":2,"countries":[{"country_key":"usa","country_name":"United States","iso":"US","prefix":"+1"},{"country_key":"canada","country_name":"Canada","iso":"CA","prefix":"+1"}]}

Get Services

GEThttps://api.varasms.com/v3/?action=services&api_key=YOUR_KEYServices

Returns all available services with NGN price. Services are the same across US and CA.

Response
{"status":"ok","count":214,"services":[{"service_code":"whatsapp","service_name":"WhatsApp","price":108.00,"currency":"NGN","available":9999},{"service_code":"google","service_name":"Google","price":96.50,"currency":"NGN","available":9999}]}

Buy Number

POSThttps://api.varasms.com/v3/?action=buy&api_key=YOUR_KEYBuy Number

Purchase a US or CA number. Save the order_id to check OTP and manage the order.

ParamTypeDescription
countrystringrequiredusa or canada
servicestringrequiredService code from /services (e.g. whatsapp, google)
Success
{"status":"ok","order_id":"TX_8f2a91c4","phone":"+19709066149","service":"WhatsApp","country":"usa","country_name":"United States","price":108.00,"currency":"NGN","expires":"2026-06-14T15:35:00","new_balance":1142.00}
Error
{"status":"error","message":"Insufficient balance. Required: ₦108.00, Available: ₦50.00."}
$ch=curl_init("https://api.varasms.com/v3/?action=buy&api_key=YOUR_KEY");
curl_setopt_array($ch,[CURLOPT_POST=>true,CURLOPT_POSTFIELDS=>http_build_query(["country"=>"usa","service"=>"whatsapp"]),CURLOPT_RETURNTRANSFER=>true]);
$r=json_decode(curl_exec($ch),true);
if($r["status"]==="ok") echo "Phone:{$r['phone']} | Order:{$r['order_id']}\n";
else echo "Error:{$r['message']}\n";
const r=await fetch("https://api.varasms.com/v3/?action=buy&api_key=YOUR_KEY",{
  method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},
  body:new URLSearchParams({country:"usa",service:"whatsapp"})
}).then(r=>r.json());
if(r.status==="ok") console.log("Phone:",r.phone,"Order:",r.order_id);
else console.error("Error:",r.message);
import requests
r=requests.post("https://api.varasms.com/v3/?action=buy&api_key=YOUR_KEY",data={"country":"usa","service":"whatsapp"}).json()
if r["status"]=="ok": print(f"Phone:{r['phone']} | Order:{r['order_id']}")
else: print("Error:",r["message"])

Check OTP

GEThttps://api.varasms.com/v3/?action=check&order_id=ORDER_ID&api_key=YOUR_KEYCheck OTP

Poll every 5 seconds. When waiting is false the order has ended. If it timed out with no OTP, refunded will be true.

ParamTypeDescription
order_idstringrequiredorder_id from the buy response
Waiting
{"status":"ok","order_status":"PENDING","sms_code":"","waiting":true}
OTP Received
{"status":"ok","order_status":"RECEIVED","sms_code":"483920","sms_text":"Your code is 483920","waiting":false,"refunded":false}
for($i=0;$i<24;$i++){
  sleep(5);
  $r=json_decode(file_get_contents("https://api.varasms.com/v3/?action=check&api_key=YOUR_KEY&order_id=$order_id"),true);
  if(!empty($r["sms_code"])){ echo "OTP:".$r["sms_code"]; break; }
  if(!$r["waiting"]) break;
}
const sleep=ms=>new Promise(r=>setTimeout(r,ms));
for(let i=0;i<24;i++){
  await sleep(5000);
  const r=await fetch("https://api.varasms.com/v3/?action=check&api_key=YOUR_KEY&order_id="+orderId).then(r=>r.json());
  if(r.sms_code){console.log("OTP:",r.sms_code);break;}
  if(!r.waiting) break;
}
import requests,time
for _ in range(24):
  time.sleep(5)
  r=requests.get("https://api.varasms.com/v3/?action=check&api_key=YOUR_KEY&order_id="+order_id).json()
  if r.get("sms_code"):print("OTP:",r["sms_code"]);break
  if not r.get("waiting"):break

Get Active Order

GEThttps://api.varasms.com/v3/?action=getactive&api_key=YOUR_KEYActive Order

Returns your most recent in-progress order from the last 25 minutes — useful for resuming after a disconnect. Returns order: null if there is no active order. Poll check afterwards for the live OTP.

Active Order
{"status":"ok","order":{"order_id":"TX_8f2a91c4","ext_order_id":"TX_8f2a91c4","phone":"+19709066149","service":"WhatsApp","service_code":"whatsapp","country":"usa","country_name":"United States","price":108.00,"currency":"NGN","sms_code":"","sms_text":"","expires":"2026-06-14T15:35:00","ttl_seconds":284,"waiting":true}}
No Active Order
{"status":"ok","order":null}

Cancel & Refund

POSThttps://api.varasms.com/v3/?action=cancel&api_key=YOUR_KEY · body: order_idCancel

Cancels the order. Wallet is automatically refunded if no OTP was received.

Response
{"status":"ok","order_id":"TX_8f2a91c4","action":"cancel","refunded":true,"refund_amount":108.00,"message":"Cancelled successfully. Wallet refunded."}

Mark Done / Report Bad

POSThttps://api.varasms.com/v3/?action=finish or ?action=ban · body: order_id

finish — Mark complete after using the OTP.  |  ban — Report as invalid or not receiving SMS.

finish
{"status":"ok","action":"finish","message":"Finished successfully."}
ban
{"status":"ok","action":"ban","message":"Banned successfully."}

Full Flow Example

<?php
define("KEY","YOUR_API_KEY"); define("BASE","https://api.varasms.com/v3/");
function v3get($a,$p=[]){$p["action"]=$a;$p["api_key"]=KEY;return json_decode(file_get_contents(BASE."?".http_build_query($p)),true);}
function v3post($a,$p=[]){$ch=curl_init(BASE."?action=$a&api_key=".KEY);curl_setopt_array($ch,[CURLOPT_POST=>true,CURLOPT_POSTFIELDS=>http_build_query($p),CURLOPT_RETURNTRANSFER=>true]);$r=curl_exec($ch);curl_close($ch);return json_decode($r,true);}

$bal=v3get("balance");
echo "Balance: NGN {$bal['balance']}\n";

$buy=v3post("buy",["country"=>"usa","service"=>"whatsapp"]);
if($buy["status"]!=="ok") die("Buy failed:".$buy["message"]);
$order=$buy["order_id"];
echo "Phone:{$buy['phone']} | Order:$order\n";

$otp=null;
for($i=0;$i<24;$i++){
    sleep(5);
    $chk=v3get("check",["order_id"=>$order]);
    if(!empty($chk["sms_code"])){$otp=$chk["sms_code"];echo "OTP:$otp\n";break;}
    if(!$chk["waiting"]) break;
}
if($otp) v3post("finish",["order_id"=>$order]);
else{$c=v3post("cancel",["order_id"=>$order]);echo $c["refunded"]?"Refunded\n":"Cancelled\n";}
const KEY="YOUR_API_KEY",BASE="https://api.varasms.com/v3/";
const sleep=ms=>new Promise(r=>setTimeout(r,ms));
async function v3get(a,p={}){const u=new URL(BASE);Object.entries({...p,action:a,api_key:KEY}).forEach(([k,v])=>u.searchParams.set(k,v));return fetch(u).then(r=>r.json());}
async function v3post(a,p={}){return fetch(`${BASE}?action=${a}&api_key=${KEY}`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(p)}).then(r=>r.json());}
(async()=>{
  const buy=await v3post("buy",{country:"usa",service:"whatsapp"});
  if(buy.status!=="ok"){console.error(buy.message);return;}
  console.log("Phone:",buy.phone,"Order:",buy.order_id);
  let otp=null;
  for(let i=0;i<24;i++){
    await sleep(5000);
    const chk=await v3get("check",{order_id:buy.order_id});
    if(chk.sms_code){otp=chk.sms_code;console.log("OTP:",otp);break;}
    if(!chk.waiting) break;
  }
  if(otp) await v3post("finish",{order_id:buy.order_id});
  else{const c=await v3post("cancel",{order_id:buy.order_id});console.log(c.refunded?"Refunded":"Cancelled");}
})();
import requests,time
KEY="YOUR_API_KEY";BASE="https://api.varasms.com/v3/"
def v3get(a,p=None):return requests.get(BASE,params={**(p or{}),"action":a,"api_key":KEY}).json()
def v3post(a,p=None):return requests.post(f"{BASE}?action={a}&api_key={KEY}",data=p or{}).json()

buy=v3post("buy",{"country":"usa","service":"whatsapp"})
if buy["status"]!="ok":exit("Buy failed:"+buy["message"])
order_id=buy["order_id"]
print(f"Phone:{buy['phone']} | Order:{order_id}")
otp=None
for _ in range(24):
    time.sleep(5)
    chk=v3get("check",{"order_id":order_id})
    if chk.get("sms_code"):otp=chk["sms_code"];print("OTP:",otp);break
    if not chk.get("waiting"):break
if otp:v3post("finish",{"order_id":order_id})
else:
    c=v3post("cancel",{"order_id":order_id})
    print("Refunded" if c["refunded"] else "Cancelled")