GET
/getNumber
Request a new virtual number for a specific service. If successful, this endpoint returns the number ID, the phone number, and the associated cost.
Query Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| api_key | string | Your secret API key found in settings. | Yes |
| service | string | The service code (e.g., 'wa' for WhatsApp, 'tg' for Telegram). | Yes |
Example Request (cURL)
curl -X GET \
'https://api.smsprovider.in/api/getNumber?api_key=YOUR_API_KEY&service=wa'
'https://api.smsprovider.in/api/getNumber?api_key=YOUR_API_KEY&service=wa'
Example Request (PHP)
<?php
$url = 'https://api.smsprovider.in/api/getNumber?api_key=YOUR_KEY&service=wa';
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
Success Response
{
"status": "success",
"id": 12345,
"number": "919876543210",
"service": "wa",
"cost": 15.00,
"expiry": "2026-02-09 15:30:00"
}