أرسل وتحقق بسطرين من الكود في أي لغة تختارها.
// إرسال OTP
Future<bool> sendOtp(String phone) async {
final res = await http.post(Uri.parse('https://wp.964.live/otp/send/auto'),
headers: {'x-api-key': 'sk_live_...', 'Content-Type': 'application/json'},
body: jsonEncode({'phone': phone}));
return res.statusCode == 200;
}
// التحقق
Future<bool> verifyOtp(String phone, String otp) async {
final res = await http.post(Uri.parse('https://wp.964.live/otp/verify'),
headers: {'x-api-key': 'sk_live_...', 'Content-Type': 'application/json'},
body: jsonEncode({'phone': phone, 'otp': otp}));
return res.statusCode == 200;
}
// إرسال OTP
await fetch('https://wp.964.live/otp/send/auto', {
method:'POST', headers:{'x-api-key':'sk_live_...','Content-Type':'application/json'},
body: JSON.stringify({phone})});
// التحقق
await fetch('https://wp.964.live/otp/verify', {
method:'POST', headers:{'x-api-key':'sk_live_...','Content-Type':'application/json'},
body: JSON.stringify({phone,otp})});
import requests
HEADERS = {'x-api-key':'sk_live_...', 'Content-Type':'application/json'}
requests.post('https://wp.964.live/otp/send/auto', json={'phone':phone}, headers=HEADERS)
requests.post('https://wp.964.live/otp/verify', json={'phone':phone,'otp':otp}, headers=HEADERS)
# إرسال
curl -X POST https://wp.964.live/otp/send/auto \
-H "x-api-key: sk_live_..." -H "Content-Type: application/json" \
-d '{"phone":"07XXXXXXXXX"}'
# تحقق
curl -X POST https://wp.964.live/otp/verify \
-H "x-api-key: sk_live_..." -H "Content-Type: application/json" \
-d '{"phone":"07XXXXXXXXX","otp":"00964"}'