Skip to content

Latest commit

 

History

History
73 lines (56 loc) · 1.44 KB

Readme.md

File metadata and controls

73 lines (56 loc) · 1.44 KB

Email Verification API

This API allows you to generate and verify email verification codes for a specified email address.

Base URL

https://verify-email.onrender.com/

Endpoint

Get /generateCode
Get /VerifyCode

GenerateCode Endpoint

This endpoint generates a verification code and sends it to the specified email address.

Request

URL: '/generateCode'
Method: GET
Query Parameters:
    email: the email address to which the verification code should be sent.

Response

Success:

{
  "status": true,
  "message": "Verification code has been sent to user@example.com"
}

Error:

{
  "status": false,
  "message": "Error sending verification code"
}

VerifyCode Endpoint

This endpoint verifies the entered verification code for the specified email address.

Request

URL: '/verifyCode'
Method: GET
Query Parameters:
    email: the email address for which the verification code should be verified.
    code: This endpoint verifies the entered verification code for the specified email address.

Response

Success:

{
  "status": true,
  "message": "Verification successful",
  "codeExpired": true,
  "attemptsLeft": 0
}

Error:

{
  "status": true,
  "message": "Verification successful",
  "codeExpired": false,
  "attemptsLeft": 2
}