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 [email protected] 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' \
--data-raw '{
"email": "[email protected]",
"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' \
--data-raw '{
"method": "token",
Which frontend SDK do you use?
supertokens-web-js / mobile