# React auth0 sdk

**URL:** <https://community.auth0.com/t/react-auth0-sdk/79724>\
**Category:** Get Help\
**Created:** [March 11, 2022, 2:29pm UTC](https://community.auth0.com/t/react-auth0-sdk/79724 "2022-03-11T14:29:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pandeysumit832](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/pandeysumit832/32/24787_2.png) [@pandeysumit832](https://community.auth0.com/u/pandeysumit832)\
**Post date:** [March 11, 2022, 2:29pm UTC](https://community.auth0.com/t/react-auth0-sdk/79724/1 "2022-03-11T14:29:21Z")

</div>

I am using auth0 SDK and using getAccessTokenSilently() to update user meta data const accessToken = await getAccessTokenSilently({ audience: `https://${domain}/api/v2/`, scope: “update:users”, }); and also tried update:user.user\_metadata still its saying 401 unauthorized

---

<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:** [March 11, 2022, 9:58pm UTC](https://community.auth0.com/t/react-auth0-sdk/79724/3 "2022-03-11T21:58:51Z")

</div>

Hi @pandeysumit832,

Thanks for reaching out to the Auth0 Community!

I understand you are trying to update your user’s user\_metadata using the Management API.

First, you will need to get a Management API token by calling the `/oauth/token` endpoint using the `client_credentials` grant.

Then once you have the Management API Token, you can use it to make requests to the Management API [Update a user endpoint](https://auth0.com/docs/api/management/v2#!/Users/patch_users_by_id) to update the user’s user\_metadata.

You may find our [Get Management API Access Tokens for Production](https://auth0.com/docs/secure/tokens/access-tokens/get-management-api-access-tokens-for-production) documentation useful.

Hoped this helps!

Please reach out if you have any further questions.

Thank you.

---

<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:** [March 26, 2022, 9:58pm UTC](https://community.auth0.com/t/react-auth0-sdk/79724/4 "2022-03-26T21:58:56Z")

</div>

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