Check Phone
POSThttps://api.ymtaz.sa/api/v1/auth/check-phone
Checks if a phone number is eligible for registration and sends an OTP if it is.
Request Body
phone_codestringRequiredThe country code for the phone number (e.g., 966 for Saudi Arabia).
phonestringRequiredThe phone number to check and send OTP to.
curl https://api.ymtaz.sa/api/v1/auth/check-phone \
-X POST \
-H "Content-Type: multipart/form-data" \
-F "phone_code=966" \
-F "phone=123123123"Successful Response
{
"status": true,
"code": 200,
"message": "تم ارسال كود التأكيد على SMS , نرجو مراجعة هاتفك حتي يمكنك تأكيد رقمك ,",
"data": null
}Error Response
{
"status": false,
"code": 422,
"message": "invalid_data",
"data": {
"errors": {
"phone": [
"رقم الهاتف موجود سابقاً"
]
}
}
}Try it out
Confirm Phone
POSThttps://api.ymtaz.sa/api/v1/auth/confirm-phone
Confirms the phone number using the OTP sent by the Check Phone endpoint.
Request Body
phone_codestringRequiredThe country code for the phone number (e.g., 966 for Saudi Arabia).
phonestringRequiredThe phone number to confirm.
otpstringRequiredThe OTP received via SMS.
curl https://api.ymtaz.sa/api/v1/auth/confirm-phone \
-X POST \
-H "Content-Type: multipart/form-data" \
-F "phone_code=966" \
-F "phone=123123123" \
-F "otp=653124"Successful Response
{
"status": true,
"code": 200,
"message": "تم تأكيد رقم الهاتف بنجاح",
"data": null
}Error Response
{
"status": false,
"code": 400,
"message": "رمز التأكيد خطأ",
"data": null
}