OTP
Gönderim
Belirtilen telefon numarasına, OTP gönderimini sağlar.
Not: Development ortamında doğrulamayı başarılı şekilde çalıştırmanız için response da code bilgisi gönderilmektedir.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
OTPSendRequest
phone*string
Kullanıcı telefon bilgisi (E.164 Format)
gateway*string
OTP gönderim tipi
Default
"sms"Value in
"sms" | "whatsapp"app_hash?string
Gönderilecek sms doğrulama koduna mobil uygulamalardan erişebilmek için kullanılabilir. (Mesaj içeriğine app_hash değeri eklenir)
{
"phone": "+905231113344",
"gateway": "sms",
"app_hash": null
}Response Body
application/json
application/json
application/json
curl -X POST "https://api.altpay.dev/integration/otp/send" \ -H "Content-Type: application/json" \ -d '{ "phone": "+905231113344", "gateway": "sms" }'{
"data": {
"expires_at": "2019-08-24T14:15:22Z",
"server_time": "2019-08-24T14:15:22Z",
"code": 123456
}
}{
"message": "Unauthenticated"
}{
"message": "Gönderdiğiniz Veriler Geçersiz",
"errors": {
"property": [
"Hata açıklaması"
]
}
}