# How to get user\_id at Redirect To URL at Email Templates of Verify Email using Link

**URL:** <https://community.auth0.com/t/how-to-get-user-id-at-redirect-to-url-at-email-templates-of-verify-email-using-link/125167>\
**Category:** Get Help\
**Tags:** email-providers, aws\
**Created:** [January 19, 2024, 8:18am UTC](https://community.auth0.com/t/how-to-get-user-id-at-redirect-to-url-at-email-templates-of-verify-email-using-link/125167 "2024-01-19T08:18:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![binh.tieu](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/binh.tieu/32/49655_2.png) [@binh.tieu](https://community.auth0.com/u/binh.tieu)\
**Post date:** [January 19, 2024, 8:18am UTC](https://community.auth0.com/t/how-to-get-user-id-at-redirect-to-url-at-email-templates-of-verify-email-using-link/125167/1 "2024-01-19T08:18:01Z")

</div>

Upon user registration, a verification email is dispatched for confirmation.

 ![signup_notverify](https://global.discourse-cdn.com/auth0/original/3X/2/8/28e38f9dbffd62118d7625fbb096ef5b9e3e067f.png)

Upon clicking the verification link, I understand that we utilize the “Branding” settings, specifically the “Email Templates” section where there is a “Redirect To” option. Following my investigation, I have noted that three variables—`application.name`, `application.clientID`, and `application.callback_domain`—are available for use in the Redirect To URL.

 ![emailredirectTo](https://global.discourse-cdn.com/auth0/original/3X/9/b/9bb884a1814ea83012f549aa7a6637400e39e585.png)

 ![image](https://global.discourse-cdn.com/auth0/original/3X/a/6/a6a1a1862b6d7a400983f3217723c09008c72e85.png)

My specific inquiry pertains to obtaining the `user_id` during this process.  
I aim to receive the `user_id` in the URL and subsequently update the ‘verifyflag’ associated with that `user_id` in our internal database.

Could you kindly guide me on how I can retrieve the `user_id` in this context? Any assistance or insights you can provide would be greatly appreciated.

Thank you for your valuable support!

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [January 19, 2024, 5:20pm UTC](https://community.auth0.com/t/how-to-get-user-id-at-redirect-to-url-at-email-templates-of-verify-email-using-link/125167/3 "2024-01-19T17:20:08Z")

</div>

Hi @binh.tieu,

Thanks for reaching out to the Auth0 Community!

Unfortunately, the user\_id is not a callable attribute for the Redirect To field. Only `application.name`, `application.clientID`, and `application.callback_domain` are callable variables for the Redirect To field.

As a workaround, you can manually update the verify flag in your internal database once the user has verified the email address. This approach can be combined with a [log streaming service](https://auth0.com/docs/customize/log-streams/custom-log-streams) to monitor Success Verification Email ([`sv` log event type](https://auth0.com/docs/deploy-monitor/logs/log-event-type-codes#:~:text=sv-,Success%20Verification%20Email,-Successfully%20consumed%20email)) logs and update the verify flag accordingly.

Alternatively, you could use a [Post-Login Action](https://auth0.com/docs/customize/actions/flows-and-triggers/login-flow) to programmatically update the verify flag in your internal database whenever a user logs in. However, this could affect the freshness of the data in your internal database, as it’s contingent on the user logging in after they have verified their email address. Thus, for this to work, you could redirect the user back to your login page to prompt them to login and allow this flow to execute.

Please let me know if you have any questions.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![binh.tieu](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/binh.tieu/32/49655_2.png) [@binh.tieu](https://community.auth0.com/u/binh.tieu)\
**Post date:** [January 22, 2024, 4:08am UTC](https://community.auth0.com/t/how-to-get-user-id-at-redirect-to-url-at-email-templates-of-verify-email-using-link/125167/4 "2024-01-22T04:08:36Z")

</div>

Hi, this morning, I tried your suggestion about log-streaming  
It worked.  
I created a custom webhook

 ![image](https://global.discourse-cdn.com/auth0/original/3X/9/b/9b00ce0634b555280745add057c10fc77ad562e7.png)  
In a custom webhook, I call the payload URL which is my API endpoint. With body payload, I got user\_id and I can update verify flag for my external database  
Thanks for you suggestion.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [February 5, 2024, 4:08am UTC](https://community.auth0.com/t/how-to-get-user-id-at-redirect-to-url-at-email-templates-of-verify-email-using-link/125167/5 "2024-02-05T04:08:53Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
