5sim & SMS-Activate Protocol Compatible

Developer API & Automation

Integrate temporary numbers and OTP retrieval into Python scripts, Puppeteer scrapers, registration bots, and backend services.

YOUR API ACCESS TOKEN
vsk_your_api_key_here

1. 5sim / SMS-Activate Standard Handler Protocol

Compatible out of the box with standard SMS verification libraries and bots. Use the base endpoint: https://whichsms.org/stubs/handler_api.php

Check Balance

curl "https://whichsms.org/stubs/handler_api.php?action=getBalance&api_key=vsk_your_api_key_here"
Response: ACCESS_BALANCE:25.00

Acquire Phone Number

curl "https://whichsms.org/stubs/handler_api.php?action=getNumber&service=wa&country=us&api_key=vsk_your_api_key_here"
Response: ACCESS_NUMBER:1492:15553920194 (Format: ACCESS_NUMBER:ORDER_ID:PHONE_NUMBER)

Get Verification Code / Poll Status

curl "https://whichsms.org/stubs/handler_api.php?action=getStatus&id=1492&api_key=vsk_your_api_key_here"
Responses:
STATUS_WAIT_CODE (Still waiting for SMS)
STATUS_OK:849201 (SMS received with extracted OTP)
STATUS_CANCEL (Cancelled / 5-min timeout and refunded)

Cancel & Instant Wallet Refund

curl "https://whichsms.org/stubs/handler_api.php?action=setStatus&status=8&id=1492&api_key=vsk_your_api_key_here"
Response: ACCESS_CANCEL (Released upstream, zero charges, balance refunded).

Python Automation Example

import time
import requests

API_KEY = "vsk_your_api_key_here"
BASE_URL = "https://whichsms.org/stubs/handler_api.php"

# 1. Order a WhatsApp USA number
resp = requests.get(f"{BASE_URL}?action=getNumber&service=wa&country=us&api_key={API_KEY}").text
if not resp.startswith("ACCESS_NUMBER"):
    print("Error ordering number:", resp)
    exit()

_, order_id, phone = resp.split(":")
print(f"Allocated Phone: +{phone} (Order ID: {order_id})")

# 2. Poll for SMS Code (Max 5 minutes)
start_time = time.time()
while time.time() - start_time < 300:
    status_resp = requests.get(f"{BASE_URL}?action=getStatus&id={order_id}&api_key={API_KEY}").text
    if status_resp.startswith("STATUS_OK"):
        code = status_resp.split(":")[1]
        print(f"✅ OTP Code Received: {code}")
        break
    elif status_resp == "STATUS_WAIT_CODE":
        print("Waiting for SMS...")
        time.sleep(3)
    else:
        print("Order ended or cancelled:", status_resp)
        break
else:
    # 3. Timeout: release upstream & auto-refund
    requests.get(f"{BASE_URL}?action=setStatus&status=8&id={order_id}&api_key={API_KEY}")
    print("Timeout reached: order cancelled and refunded.")