انتقل إلى المحتوى الرئيسي

Phone Number Verify

This API allows you to check the validity of a phone number before sending a verification code. You can use this API to validate phone numbers before sending verification codes, which can help reduce the number of invalid or incorrect phone numbers in your system.

  • Endpoint: api/customer/profile/phone-verify

  • HTTP Method: POST

  • Request Body:

    • verification_code: The verification code that was sent to the phone number.
نصيحة

In cases where the request payload does not include a verification_code key, the system will initiate the process by automatically sending a verification code to the provided phone number. Users will receive this code via SMS and will be required to input it to verify their phone number. This step is crucial to ensure the accuracy and security of the contact information provided

{
"verification_code": "1234"
}
  • Success Response:
Customer Resource

You can check more details about Customer Resource.

{
"code": 200,
"message": "Your phone number is verified successfully",
"data": {
"id": 1017390,
"name": "Test",
//...
}
}
  • Failure Response:

409: The phone number is not verified, and a verification code has been sent to the phone number. The response will include a message field with instructions to enter the verification code in the request payload.

{
"code": 409,
"message": "please verify your phone",
"errors": {
"errorMessage": "invalid data",
"errorDetails": []
}
}
معلومات

Check the following section to learn more about the Check Phone Number Verify API Reference

Resend Verification

This API allows you to resend a verification code to a phone number that has already been registered in the system. This can be useful if the user did not receive the code

  • Endpoint: api/customer/profile/resend_verification

  • HTTP Method: POST

  • Success Response:

Customer Resource

You can check more details about Customer Resource.

{
"code": 200,
"data": {
"id": 1017390,
"name": "Test",
//...
}
}