# How to update user app\_metadata

**URL:** <https://community.auth0.com/t/how-to-update-user-app-metadata/63193>\
**Category:** Get Help\
**Tags:** nextjs\
**Created:** [May 21, 2021, 9:01pm UTC](https://community.auth0.com/t/how-to-update-user-app-metadata/63193 "2021-05-21T21:01:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrewscofield](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/andrewscofield/32/29562_2.png) [@andrewscofield](https://community.auth0.com/u/andrewscofield)\
**Post date:** [May 21, 2021, 9:01pm UTC](https://community.auth0.com/t/how-to-update-user-app-metadata/63193/1 "2021-05-21T21:01:01Z")

</div>

- **Which SDK this is regarding:** nextjs-auth0
- **SDK Version:** 1.3.1
- **Platform Version:** 12.22.0
- **Code Snippets/Error Messages/Supporting Details/Screenshots:**

I’ve got the basic login working 👍. But I can’t figure out how to update user\_metadata and app\_metadata, from the client js or nodejs. Do I have to install and setup node-auth0 as well for these api calls? I can see how to get my token, do I just have to make my own API calls using it? Seems strange that these functions wouldn’t be built into the library.

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [May 24, 2021, 12:03pm UTC](https://community.auth0.com/t/how-to-update-user-app-metadata/63193/3 "2021-05-24T12:03:44Z")

</div>

Hi @andrewscofield,

> [@andrewscofield](#):
>
> I can see how to get my token, do I just have to make my own API calls using it?

Yes, that is correct. With [`node-auth0`](https://auth0.github.io/node-auth0/index.html) you can use the ManagementClient to make these calls:

```auto
var ManagementClient = require('auth0').ManagementClient;

var management = new ManagementClient({
  token: '{YOUR_API_V2_TOKEN}',
  domain: '{YOUR_ACCOUNT}.auth0.com'
});

var params = { id: USER_ID };
var metadata = {
  foo: 'bar'
};

management.updateAppMetadata(params, metadata, function (err, user) {
  if (err) {
    // Handle error.
  }

  // Updated user.
  console.log(user);
});

```

But this functionality is not built into the `nextjs-auth0` library.

You can get more information about using the management API in client JS here: [Get Management API Access Tokens for Single-Page Applications](https://auth0.com/docs/tokens/management-api-access-tokens/get-management-api-tokens-for-single-page-applications)

---

<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:** [June 8, 2021, 12:04pm UTC](https://community.auth0.com/t/how-to-update-user-app-metadata/63193/4 "2021-06-08T12:04:28Z")

</div>

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