Integrate PlugGuySMS SMS verification into your website or mobile app.
https://plugguysms.com/api/v1All requests must include your API key. Generate one from your dashboard under Profile → API Key.
Send the key as a bearer token, or as a query parameter:
Authorization: Bearer sv_live_xxxxxxxxxxxxxxxx
GET /api/v1/balance.php?api_key=sv_live_xxxxxxxxxxxxxxxx
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/balance.php |
Get your wallet balance. |
| GET | /api/v1/servers.php |
List available servers (server1–server4). |
| GET | /api/v1/countries.php |
List available countries. Optional: ?server=server1 |
| GET | /api/v1/services.php |
List services with prices and stock. Optional: ?country=US&server=server1 |
| GET | /api/v1/numbers.php |
Check availability. Optional: ?country=US&service=whatsapp&server=server1 |
| POST | /api/v1/order.php |
Purchase a number. Body: server, country, service. |
| GET | /api/v1/order-status.php?id=... |
Get order status. |
| GET | /api/v1/order-sms.php?id=... |
Retrieve the verification code for an order. |
| POST | /api/v1/cancel-order.php?id=... |
Cancel an order. |
| GET | /api/v1/orders.php |
List your recent orders. |
Request body (JSON):
{
"server": "server1",
"country": "US",
"service": "whatsapp"
}
Response:
{
"success": true,
"order": {
"order_id": "ORD-20240101120000ABC",
"number": "+12025550123",
"price": 420.00,
"status": "active",
"expires_at": "2024-01-01 12:20:00"
}
}
cURL
curl -X POST https://plugguysms.com/api/v1/order.php \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"server":"server1","country":"US","service":"whatsapp"}'
PHP
$ch = curl_init('https://plugguysms.com/api/v1/order.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['server'=>'server1','country'=>'US','service'=>'whatsapp']));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = json_decode(curl_exec($ch), true);
JavaScript (fetch)
const res = await fetch('https://plugguysms.com/api/v1/order.php', {
method: 'POST',
headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' },
body: JSON.stringify({ server: 'server1', country: 'US', service: 'whatsapp' })
});
const order = await res.json();
Python
import requests
r = requests.post('https://plugguysms.com/api/v1/order.php',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
json={'server': 'server1', 'country': 'US', 'service': 'whatsapp'})
order = r.json()
Flutter / Dart
final res = await http.post(
Uri.parse('https://plugguysms.com/api/v1/order.php'),
headers: {'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json'},
body: jsonEncode({'server': 'server1', 'country': 'US', 'service': 'whatsapp'}),
);
curl "https://plugguysms.com/api/v1/order-sms.php?id=ORD-20240101120000ABC" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"status": "completed",
"number": "+12025550123",
"sms_code": "482913",
"sms_text": "Your WhatsApp verification code is 482913."
}
While the code has not arrived, status is waiting_sms. Poll every 5 seconds or rely on the sms.received webhook.
Set a webhook URL in your dashboard (Profile → Webhook). We send POST requests with JSON payloads signed using HMAC-SHA256 of the raw body with your webhook secret.
| Event | Description |
|---|---|
order.created | An order was placed successfully. |
sms.received | A verification code arrived for an order. |
order.completed | An order completed. |
order.cancelled | An order was cancelled. |
order.refunded | An order was refunded. |
{
"event": "sms.received",
"order_id": "ORD-20240101120000ABC",
"status": "completed",
"phone_number": "+12025550123",
"service": "whatsapp",
"country": "US",
"verification_code": "482913"
}
Verify signatures with the headers X-Webhook-Signature and X-Webhook-Event.
| HTTP | Code | Meaning |
|---|---|---|
| 400 | INVALID_PARAMETERS | Missing or invalid request parameters. |
| 401 | INVALID_KEY | Missing, revoked or unknown API key. |
| 402 | INSUFFICIENT_BALANCE | Wallet balance is too low. |
| 403 | ACCOUNT_SUSPENDED | The account is suspended. |
| 404 | ORDER_NOT_FOUND | The order does not exist. |
| 409 | NO_STOCK | The requested service has no stock. |
| 429 | RATE_LIMITED | Too many requests. Slow down. |
| 500 | SERVER_ERROR | Unexpected server error. |
Requests are limited per API key: 60 per minute and 1000 per hour. Exceeding the limit returns HTTP 429.