React auth0 sdk

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

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 to update the user’s user_metadata.

You may find our Get Management API Access Tokens for Production documentation useful.

Hoped this helps!

Please reach out if you have any further questions.

Thank you.