Skip to main content

Python SDK for VirtualSMS — SMS verification with real physical SIM cards

Project description

VirtualSMS Python SDK

Python client for VirtualSMS — SMS verification using real physical SIM cards.

Unlike VoIP-based services, VirtualSMS uses real SIM cards in hardware modems connected to European and US cellular networks. This means near-100% delivery rates on platforms like WhatsApp, Telegram, and banking apps that block virtual numbers.

Installation

pip install virtualsms

Quick Start

from virtualsms import VirtualSMS

# Get your API key at https://virtualsms.io (Settings → API Keys)
client = VirtualSMS("vsms_your_api_key")

# Check balance
balance = client.get_balance()
print(f"Balance: ${balance:.2f}")

# Get a number for WhatsApp verification
activation = client.get_number("wa", country=22)  # 22 = UK
print(f"Use this number: {activation.phone}")

# Wait for the verification code
code = client.wait_for_code(activation.activation_id)
print(f"Verification code: {code}")

# Mark as done
client.done(activation.activation_id)

Services

Common service codes:

Service Code
WhatsApp wa
Telegram tg
Google go
Instagram ig
Facebook fb
Discord ds
TikTok lf
Twitter/X tw

700+ services supported. Full list at virtualsms.io/services.

Countries

Common country codes:

Country Code
United States 187
United Kingdom 22
Germany 12
France 33
Netherlands 57
Russia 0

30+ countries available. See virtualsms.io/pricing for all options.

API Methods

get_balance() → float

Returns current account balance in USD.

get_number(service, country) → Activation

Request a phone number for verification. Returns an Activation with activation_id and phone.

get_status(activation_id) → (status, code)

Check if SMS has arrived. Returns ("waiting", None) or ("received", "438271").

wait_for_code(activation_id, timeout=300) → str | None

Poll for SMS code with automatic retry. Returns the code or None on timeout.

done(activation_id)

Mark activation as complete after using the code.

cancel(activation_id)

Cancel activation and get automatic refund.

get_prices(service=None, country=None)

Get current pricing for services and countries.

Why Real SIM Cards?

Most SMS verification services use VoIP numbers that get blocked:

  • WhatsApp blocks 90%+ of VoIP numbers
  • Telegram flags and restricts VoIP accounts
  • Banking apps reject non-mobile numbers
  • Crypto exchanges require real carrier numbers

VirtualSMS solves this with physical SIM cards in real mobile networks. Learn more.

Migrating from DaisySMS?

VirtualSMS API is fully compatible with the sms-activate protocol. If you used DaisySMS, change one line:

# Before
client = VirtualSMS("your_key", base_url="https://daisysms.com/stubs/handler_api.php")

# After
client = VirtualSMS("your_key")  # defaults to virtualsms.io

See the migration guide.

Links

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

virtualsms-1.0.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

virtualsms-1.0.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file virtualsms-1.0.0.tar.gz.

File metadata

  • Download URL: virtualsms-1.0.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for virtualsms-1.0.0.tar.gz
Algorithm Hash digest
SHA256 bbdbbd0865a6d453e79e1d152de6bfa7facceddf5ed4d2cf1b01eb2e6e30b7f3
MD5 c283b65fd46665086bee4c51b5c447c2
BLAKE2b-256 5ceaa7f46f9e23ada0235081efce5dc607636242bf05be4f67e3ad8a79c913f7

See more details on using hashes here.

File details

Details for the file virtualsms-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: virtualsms-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for virtualsms-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f0f5b94ea3074b65c340805c77394be34148433587bb453054af9664da98f778
MD5 593559a4e65c66cab3aefde129b8c9e9
BLAKE2b-256 d5424b09b9a8dd88e3133f26c873ad03570a548bc8e1006e8eefba1b4e0bdf1a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page