# Access user cookies in an Action

**URL:** <https://community.auth0.com/t/access-user-cookies-in-an-action/111426>\
**Category:** Get Help\
**Tags:** extensibility, actions-extensibility\
**Created:** [July 17, 2023, 12:35pm UTC](https://community.auth0.com/t/access-user-cookies-in-an-action/111426 "2023-07-17T12:35:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![arnaud.courdille](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@arnaud.courdille](https://community.auth0.com/u/arnaud.courdille)\
**Post date:** [July 17, 2023, 12:35pm UTC](https://community.auth0.com/t/access-user-cookies-in-an-action/111426/1 "2023-07-17T12:35:13Z")

</div>

Hi, I’m trying to create an Action to push a tracking event (Segment) when a login succeed. I know I could use a Webhook to do so but I would like to try an Action because it would be faster to implement. I would need to access the user cookies to retrieve a tracking id and getting the event recorded in the user flow. So my question is, it is possible to access user cookies in an Auth0 Action? At least read them. I tried using event.request.cookies but it is not available.

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [July 17, 2023, 11:07pm UTC](https://community.auth0.com/t/access-user-cookies-in-an-action/111426/3 "2023-07-17T23:07:22Z")

</div>

Hello @arnaud.courdille and welcome to the community!

> [@arnaud.courdille](#):
>
> So my question is, it is possible to access user cookies in an Auth0 Action? At least read them. I tried using event.request.cookies but it is not available.

Unfortunately, cookies aren’t going to be available from within an Action. If you are looking to customize the authentication experience based on certain data, it’s typically recommended to store such data in user\_metadata or app\_metadata.

> **[Manage User Metadata with the post-login Action Trigger](https://auth0.com/docs/manage-users/user-accounts/metadata/manage-user-metadata)**
>
> Learn how to use the post-login Action trigger to modify user\_metadata and app\_metadata as part of a user’s login flow.

Hope this helps to clarify!

---

<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:** [July 31, 2023, 11:07pm UTC](https://community.auth0.com/t/access-user-cookies-in-an-action/111426/4 "2023-07-31T23:07:38Z")

</div>

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