---
title: Mark email as verified
sidebar:
  order: 3
---

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 `johnDoe@gmail.com` and userId as `056f4b02-c992-42ed-a8af-cb709669bbd`

```bash
curl --location --request POST '<CORE_API_ENDPOINT>/recipe/user/email/verify/token' \
--header 'api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json; charset=utf-8' \
--data-raw '{
  "email": "johnDoe@gmail.com",
  "userId": "056f4b02-c992-42ed-a8af-cb709669bbd"
}'
```

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

```bash
{
    "status":"OK",
    "token":"OWU2OGQyZWQ5MGFkMzM1M2Y4ZDMzNjE1NzA4ZGI0YWYyODEwMzg0NjJhNTcxNDZjYmY0NzJiOTZmYWE5OTJkMzRmOWVkYzBiODZkMWNmYTJkY2I5YWJkZDU2Yjg0NTU0"    
} 
```

## 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.

```bash
curl --location --request POST '<CORE_API_ENDPOINT>/recipe/user/email/verify' \
--header 'api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json; charset=utf-8' \
--data-raw '{
  "method": "token",
  "token": "OWU2OGQyZWQ5MGFkMzM1M2Y4ZDMzNjE1NzA4ZGI0YWYyODEwMzg0NjJhNTcxNDZjYmY0NzJiOTZmYWE5OTJkMzRmOWVkYzBiODZkMWNmYTJkY2I5YWJkZDU2Yjg0NTU0"
}'
```
