Generating Email Verification Links without Emailing the User
Last Updated:
Overview
- Customize the email-sending process.
- Delay sending the verification email.
- Provide the verification link through an alternative channel.
Applies To
- Email verification
- Management API
Solution
Refer to the steps below for how to implement this.
- Retrieve a management API token with the create:user_tickets scope. See Get Management API Access Tokens for Production for details on how to do this.
- Call the API using the token. Here's an example using cURL:
$ curl --request POST \
--url 'https://<domain>/api/v2/tickets/email-verification' \
--header 'content-type: application/json' \
--header 'authorization: Bearer <token>' \
--data '{
"user_id": "<user ID>",
"result_url": "<result URL>"
}'
- The API will return a JSON object containing the verification URL:
{
"ticket": "https://<domain>/verify_email?ticket=<ticket id>"
}