Skip to main content

Verify Email with Code API

POST /verifyEmailWithCode

Description

This API endpoint allows users to verify their email address using a verification code sent to them. Upon successful verification, the user receives an access token for authenticated interactions with our services.

Request Body

The request utilizes GraphQL to perform the verifyEmailWithCode mutation.

Mutation:

mutation verifyEmailWithCode ($email: String!, $verificationCode: String!) {
verifyEmailWithCode (email: $email, verificationCode: $verificationCode) {
accessToken
}
}

Variables:

{
"email": "<User_Email_Address>",
"verificationCode": "<Verification_Code>"
}
  • email (String): The email address of the user that needs to be verified.
  • verificationCode (String): The verification code sent to the user's email.

Response:

  • Success (200 OK):

    {
    "data": {
    "verifyEmailWithCode": {
    "accessToken": "<Your_Access_Token>"
    }
    }
    }
    • accessToken (String): The token to be used for authenticated requests to our services.
  • Error (4XX/5XX):

    • Appropriate error messages and status codes will be returned in cases of invalid email, incorrect verification code, expired code, or server errors.

Note:

Ensure that the verification code is the one received via email and is used before it expires. The email should match the one that requested the verification.