Virtual telefon raqamlari va SMS xizmatlari uchun REST API Hujjatlari

99.9% Uptime
Real-time API
SSL Himoyalangan
24/7 Support
Autentifikatsiya
AUTH https://socgrow.uz/sms/v2?key=YOUR_API_KEY

Har bir so'rovda key parametri bilan API kalitingizni yuborishingiz shart.

API kalitingizni olish uchun @socgrowbot ga murojaat qiling.
Balansni tekshirish
GET/POST https://socgrow.uz/sms/v2?action=getBalance&key=YOUR_API_KEY
// Muvaffaqiyatli javob namunasi:
{
  "success": true,
  "result": {
    "balance": 50000.5,
    "currency": "UZS"
  }
}
Davlatlar va Narxlar
POST https://socgrow.uz/sms/v2?action=countries&key=YOUR_API_KEY

Mavjud davlatlar ro'yxati va siz uchun belgilangan joriy narxlar.

{
  "success": true,
  "countries": [
    {
      "country_code": "uz",
      "country_name": "Uzbekistan πŸ‡ΊπŸ‡Ώ",
      "qty": 6450,
      "price_uzs": 11780
    },
    {
      "country_code": "ru",
      "country_name": "Russia πŸ‡·πŸ‡Ί",
      "qty": 2840,
      "price_uzs": 9430
    }
  ]
}
Raqam sotib olish
POST https://socgrow.uz/sms/v2?action=getnum&key=YOUR_API_KEY&code=uz
ParametrMajburiyTavsif
actionHagetnum
keyHaSizning API kalitingiz
codeHaDavlat kodi (uz, ru, kz, us, ...)
serviceYo'qXizmat turi (telegram, instagram, ...)
// Muvaffaqiyatli javob:
{
  "success": true,
  "phone": "+998901234567",
  "price": 11780.00,
  "order_id": "SMSc3f5a2d1"
}
SMS kodini olish
POST https://socgrow.uz/sms/v2?action=getsms&key=YOUR_API_KEY&number=998901234567
// SMS kelgan bo'lsa:
{
  "success": true,
  "status": "ok",
  "sms": "29399",
  "from": "SENDER",
  "time": "2026-05-12 14:30:25"
}

// SMS kutilayotgan bo'lsa:
{
  "success": false,
  "error": "SMS hali kelmadi"
}
SMS kelgunicha har 3-5 soniyada so'rov yuboring. Maksimal kutish vaqti β€” 5 daqiqa.
PHP Integratsiya

Quyidagi kod orqali API'ga oson ulanish mumkin.

<?php
// API sozlamalari
$api_url = "https://socgrow.uz/sms/v2";
$api_key = "YOUR_API_KEY";

// Balansni tekshirish
$post_data = [
  'action' => 'getBalance',
  'key' => $api_key
];

$ch = curl_init($api_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
$response = curl_exec($ch);
curl_close($ch);

$result = json_decode($response, true);
print_r($result);
?>

Xatolik kodlari

invalid_key - API kaliti noto'g'ri
insufficient_balance - Balans yetarli emas
order_not_found - Buyurtma topilmadi
invalid_country - Davlat kodi noto'g'ri
no_numbers_available - Raqamlar mavjud emas
sms_not_received - SMS hali kelmagan