Phone-and-Mail-Verification-With-Link

Verify your E-Mail and Phone Number using link sent over mail and sms.

Endpoints

POST /user/create

  • Body

{
    "name":"your-name",
    "email":"your-email",
    "phone":"your-phone"
}
  • Success Response

{
    "success": true,
    "message": "Account created. Please Verify your E-Mail Address and Phone Number."
}
  • Response When E-Mail Address Exists

{
    "success": true,
    "message": "E-Mail address already in use."
}
  • Response When Phone Number Exists

{
    "success": true,
    "message": "Phone number already in use."
}
  • Response When Error Occurs Creating account

{
    "success": true,
    "message": "Error creating account. Try Again!!"
}

GET /user/verify/mail?token=your-verification-token

This is the endpoint for verification of e-mail address.

User will receive E-Mail as given in the following image.

When user click the confirm button, e-mail verification is done.

GET /user/verify/phone?token=your-verification-token

This is the endpoint for verification of phone number.

User will receive SMS as given in the following image.

When user click the link, phone number verification is done.

GitHub

View Github