virtualsms-sdk
v1.0.0
Published
Node.js SDK for VirtualSMS — SMS verification with real physical SIM cards. WhatsApp, Telegram, Google and 700+ services.
Maintainers
Readme
VirtualSMS Node.js SDK
Node.js 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. Near-100% delivery rates on platforms like WhatsApp, Telegram, and banking apps that block virtual numbers.
Installation
npm install virtualsmsQuick Start
const VirtualSMS = require('virtualsms');
// Get your API key at https://virtualsms.io (Settings → API Keys)
const client = new VirtualSMS('vsms_your_api_key');
// Check balance
const balance = await client.getBalance();
console.log(`Balance: $${balance.toFixed(2)}`);
// Get a number for WhatsApp verification
const { activationId, phone } = await client.getNumber('wa', { country: 22 }); // UK
console.log(`Use this number: ${phone}`);
// Wait for the verification code (polls automatically)
const code = await client.waitForCode(activationId);
console.log(`Verification code: ${code}`);
// Mark as done
await client.done(activationId);Rent a Dedicated Number
For long-term use (1-90 days with unlimited SMS):
const rental = await client.rentNumber('whatsapp', 'US');
console.log(`Rented: ${rental.phone}`);
console.log(`Expires: ${rental.expires_at}`);
// Check for incoming SMS
const status = await client.getRentalStatus(rental.rental_id);
if (status.sms_code) {
console.log(`Got code: ${status.sms_code}`);
}Service Codes
| Service | Code | Starting Price |
|---------|------|----------------|
| WhatsApp | wa | $0.35 |
| Telegram | tg | $0.50 |
| Google | go | $0.28 |
| Instagram | ig | $0.20 |
| Facebook | fb | $0.22 |
| Discord | ds | $0.10 |
| TikTok | lf | $0.15 |
| Twitter/X | tw | $0.20 |
700+ services supported. Full list at virtualsms.io/services.
Country Codes
| Country | Code |
|---------|------|
| United States | 187 |
| United Kingdom | 22 |
| Germany | 12 |
| France | 33 |
| Netherlands | 57 |
30+ countries. Full pricing at virtualsms.io/pricing.
API Reference
new VirtualSMS(apiKey, [options])
Create a client. Get your API key at virtualsms.io.
client.getBalance() → Promise<number>
Returns account balance in USD.
client.getNumber(service, [options]) → Promise<{activationId, phone}>
Request a number for verification.
client.getStatus(activationId) → Promise<{status, code}>
Check if SMS arrived. Returns {status: 'received', code: '438271'} when ready.
client.waitForCode(activationId, [options]) → Promise<string|null>
Poll automatically until code arrives. Default timeout: 5 minutes.
client.done(activationId) / client.cancel(activationId)
Complete or cancel an activation.
client.rentNumber(service, country) → Promise<object>
Rent a dedicated number via the modern REST API.
client.getRentalStatus(rentalId) → Promise<object>
Check rental status and incoming SMS.
Migrating from DaisySMS?
The API is fully compatible. Change one line:
// Before (DaisySMS)
const client = new VirtualSMS('key', { baseUrl: 'https://daisysms.com/stubs/handler_api.php' });
// After (VirtualSMS)
const client = new VirtualSMS('key'); // defaults to virtualsms.ioSee the migration guide.
Why Real SIM Cards?
- WhatsApp blocks 90%+ of VoIP numbers
- Telegram flags and restricts VoIP accounts
- Banking apps reject non-mobile numbers
- VirtualSMS uses physical SIM cards = real carrier numbers = near-100% delivery
Links
- Website: virtualsms.io
- API Docs: virtualsms.io/api
- Pricing: virtualsms.io/pricing
- Python SDK: pypi.org/project/virtualsms
- GitHub: github.com/virtualsms-io
License
MIT
