OTP Gönderimi
Tek kullanımlık şifre gönderimi — standart ve özel şablon.
OTP uç noktaları yüksek öncelikli iletim rotası kullanır. Kod sistem tarafından otomatik üretilir.
Standart OTP
/otp/send standart şablonla 4–6 haneli bir kod üretir ve gönderir.
POSThttps://api.turkeysms.com.tr/otp/send
| Parametre | Tür | Durum | Açıklama |
|---|---|---|---|
| api_key | string | Zorunlu | V4 API anahtarınız. |
| mobile | string | Zorunlu | Alıcı, uluslararası format (905xxxxxxxxx). |
| lang | int | Opsiyonel | 0 EN · 1 TR · 2 AR/Unicode. |
| digits | int | Opsiyonel | Kod uzunluğu, 4–6 (varsayılan 6). |
cURL
curl -X POST https://api.turkeysms.com.tr/otp/send \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_API_KEY",
"mobile": "905xxxxxxxxx",
"lang": 1,
"digits": 6
}'Özel OTP
/otp/detailed tamamen özelleştirilmiş bir şablon kullanır. text alanı mutlaka TS-CODE yer tutucusunu içermelidir; sistem bu yer tutucuyu üretilen kodla değiştirir.
POSThttps://api.turkeysms.com.tr/otp/detailed
cURL
curl -X POST https://api.turkeysms.com.tr/otp/detailed \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_API_KEY",
"mobile": "905xxxxxxxxx",
"title": "MyApp",
"text": "MyApp code: TS-CODE (valid 5 minutes)",
"lang": 0,
"digits": 6
}'text alanı TS-CODE yer tutucusunu içermezse istek reddedilir.