Endpoint
POST /virtual-numbers/worldwide/rent
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
country_code | string | Yes | Country code (e.g. ES). |
service_code | string | Yes | Service code (e.g. telegram, whatsapp). |
Example request
curl -X POST https://api.telewing247.com/api/api/v1/public/virtual-numbers/worldwide/rent \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ak_YOUR_API_KEY_HERE" \
-d '{
"country_code": "ES",
"service_code": "telegram"
}'
const response = await fetch(
"https://api.telewing247.com/api/api/v1/public/virtual-numbers/worldwide/rent",
{
method: "POST",
headers: {
Accept: "application/json",
"Content-Type": "application/json",
Authorization: "Bearer ak_YOUR_API_KEY_HERE",
},
body: JSON.stringify({
country_code: "ES",
service_code: "telegram",
}),
}
);
const data = await response.json();
Save the
activation_id returned by this endpoint. You will need it to check for incoming SMS OTPs and to update the rental status.