Skip to main content

Mark email as verified

Once a SuperTokens user has been created and their userId has been mapped, you need to mark their email as verified, if their email was verified in the old auth provider.

Step 1) Generating the email verification token:#

For example with the email as and userId as 056f4b02-c992-42ed-a8af-cb709669bbd

curl --location --request POST '/recipe/user/email/verify/token' \
--header 'api-key: ' \
--header 'Content-Type: application/json; charset=utf-8' \
--data-raw '{
"email": "",
"userId": "056f4b02-c992-42ed-a8af-cb709669bbd"

Successfully generating an email verification token will result in the following response


Step 2) Verifying the users email with the verification token#

Retrieve the token from the response of the previous request and set it in the body of the email verification request.

curl --location --request POST '/recipe/user/email/verify' \
--header 'api-key: ' \
--header 'Content-Type: application/json; charset=utf-8' \
--data-raw '{
"method": "token",
Looking for older versions of the documentation?
Which UI do you use?
Custom UI
Pre built UI