GhostSIM
REST · JSON · HTTPS

Numarayı koddan alın, kodu koddan okuyun

GhostSIM REST API ile 200+ servis için sanal numara satın al, SMS kodunu otomatik çek. Panelle aynı fiyatlar, aynı bakiye; ek ücret yok.

Base URLhttps://ghostsim.app/api/v1
01

Anahtar oluştur

Hesap › Geliştirici API bölümünden en fazla 3 anahtar oluştur. Anahtar yalnızca bir kez gösterilir.

02

Numara al

Servis ve ülke koduyla POST /numbers çağır; ücret bakiyenden düşer, numara anında gelir.

03

Kodu oku

Birkaç saniyede bir GET /numbers/{id} sorgula; sms_code dolunca kodun hazır. SMS gelmezse ücret iade edilir.

Kimlik doğrulama

Her isteğe API anahtarını Bearer olarak ekle. Anahtar hesabına bağlıdır; panelde kullandığın bakiye ve fiyatlar geçerlidir.

Authorization: Bearer YOUR_API_KEY
Accept: application/json
  • Yalnızca HTTPS
  • Anahtarı sunucunda tut, tarayıcıda/uygulamada değil
  • Sızdıysa iptal et, yenisini oluştur
  • Ek ücret yok: panelle aynı fiyat

Uç noktalar

Tüm yanıtlar JSON; listeler ve kayıtlar "data" alanında gelir.

GET /balance
Bakiye (kredi ve USD)
GET /services
Servisler ve başlangıç fiyatları
GET /services/{service}/countries
Bir servisin ülkeleri, stok ve fiyatlar
POST /numbers
Numara satın al
GET /numbers/{id}
Siparişin durumu ve SMS kodu
GET /numbers
Son siparişler
POST /numbers/{id}/finish
Kodu aldım, siparişi kapat
POST /numbers/{id}/cancel
İptal et (SMS gelmediyse iade)
POST /numbers/{id}/another
Aynı numaraya yeni SMS iste
POST /numbers/{id}/retry
Başka numara dene
POST /numbers gövdesi
  • serviceservis kodu (/services listesinden)
  • countryülke kodu (/services/{service}/countries listesinden)
  • Idempotency-Key: …isteğe bağlı; aynı anahtarla tekrar gönderirsen ikinci kez ücret alınmaz
Sipariş durumları
waiting_sms sms_received completed cancelled expired

Süre dolup SMS gelmezse sipariş expired olur ve ücret bakiyene otomatik iade edilir.

Örnek kod

# 1) Bakiyeyi gör
curl https://ghostsim.app/api/v1/balance \
  -H "Authorization: Bearer $GHOSTSIM_KEY" -H "Accept: application/json"

# 2) Numara al
curl -X POST https://ghostsim.app/api/v1/numbers \
  -H "Authorization: Bearer $GHOSTSIM_KEY" -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"service":"wa","country":"6"}'

# 3) Kod gelene kadar sorgula
curl https://ghostsim.app/api/v1/numbers/12345 \
  -H "Authorization: Bearer $GHOSTSIM_KEY" -H "Accept: application/json"
import os, time, requests

API = "https://ghostsim.app/api/v1"
H = {"Authorization": "Bearer " + os.environ["GHOSTSIM_KEY"], "Accept": "application/json"}

# Numara al
num = requests.post(API + "/numbers", json={"service": "wa", "country": "6"}, headers=H).json()["data"]
print(num["phone_number"])

# Kod gelene kadar sorgula
while True:
    a = requests.get(f"{API}/numbers/{num['id']}", headers=H).json()["data"]
    if a["sms_code"] or a["status"] in ("cancelled", "expired"):
        break
    time.sleep(5)
print(a["sms_code"])

# Siparişi kapat
requests.post(f"{API}/numbers/{num['id']}/finish", headers=H)
const API = 'https://ghostsim.app/api/v1';
const H = { Authorization: `Bearer ${process.env.GHOSTSIM_KEY}`, Accept: 'application/json', 'Content-Type': 'application/json' };

// Numara al
const { data: num } = await (await fetch(`${API}/numbers`, { method: 'POST', headers: H, body: JSON.stringify({ service: 'wa', country: '6' }) })).json();
console.log(num.phone_number);

// Kod gelene kadar sorgula
let a;
do {
  await new Promise((r) => setTimeout(r, 5000));
  ({ data: a } = await (await fetch(`${API}/numbers/${num.id}`, { headers: H })).json());
} while (!a.sms_code && !['cancelled', 'expired'].includes(a.status));
console.log(a.sms_code);

Hatalar

401
API_KEY_REQUIRED
Anahtar eksik, hatalı ya da iptal edilmiş
402
INSUFFICIENT_CREDITS
Bakiye yetersiz; "required" ve "have" alanlarına bak
422
LOW_DELIVERY
Bu ülkede şu an numara yok; retry_after saniye sonra dene
422
TOO_MANY_ACTIVE
Aynı anda çok fazla açık sipariş
429
Too Many Attempts
İstek sınırı aşıldı; Retry-After başlığını bekle
503
UPSTREAM_UNAVAILABLE
Geçici sorun; biraz sonra tekrar dene

İstek sınırları

  • Tüm istekler300/min
  • Satın alma30/min
  • İptal / bitir / yeni SMS60/min

Durum sorgusu için 3-5 saniyede bir yeterli. Daha yüksek limit gerekiyorsa destekten yaz.

API anahtarı al