Overview

Email verification is an essential step to ensure the validity of the user’s email address. This document outlines the steps to check the email verification status, request a verification email, and submit the verification token received via the system event.

Authentication

To access all these endpoint, the request must include a valid form of Authentication through one of the available Authentication Modes. All examples below use the Bearer Token Authentication Mode to demonstrate their usage but in some cases it might be simpler to use the Cookie Authentication Mode. The Authentication used should be of the end-user whose information is to be worked with.​

Checking verification status

To check a user’s email verification status, use the /auth/user/email/verify endpoint.

Example Request for Verification Status

  curl --location --request GET 'https://my-project.fastgenapp.com/auth/user/email/verify' \
    --header 'Authorization: Bearer USERS_ACCESS_TOKEN'

Requesting verification email

To request a verification email, use the /auth/user/email/verify/token endpoint.

Example Request for Verification Email

  curl --location --request POST 'https://my-project.fastgenapp.com/auth/user/email/verify/token' \
    --header 'Authorization: Bearer USERS_ACCESS_TOKEN'

Submitting Verification Token

To submit the verification token received in the email, use the /auth/user/email/verify endpoint.

Example Request for Submitting Verification Token

  curl --location --request POST 'https://my-project.fastgenapp.com/auth/user/email/verify' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer USERS_ACCESS_TOKEN' \
    --data '{
        "method": "token",
        "token": "123456"
    }'