# Is the only way to obtain a Management API token via copy and paste?

**URL:** <https://community.auth0.com/t/is-the-only-way-to-obtain-a-management-api-token-via-copy-and-paste/86908>\
**Category:** Get Help\
**Tags:** jwt, api\
**Created:** [July 13, 2022, 2:45pm UTC](https://community.auth0.com/t/is-the-only-way-to-obtain-a-management-api-token-via-copy-and-paste/86908 "2022-07-13T14:45:40Z")\
**Posts on this page:** 1\
**Showing post:** 7

<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 20, 2022, 12:38am UTC](https://community.auth0.com/t/is-the-only-way-to-obtain-a-management-api-token-via-copy-and-paste/86908/7 "2022-07-20T00:38:35Z")

</div>

No worries! Good to know that was helpful 😄

> [@robliou01](#):
>
> So basically, we have to choose between using a normal SPA or an M2M/Management API for our app, is this correct?

You will need both - The SPA app configured in Auth0 will be specific to your React App/client side. On the other hand, you will have a M2M app configured in Auth0 specific to your own API/backend. The flow would look like this:

- User logs in to your React/SPA app.
- User goes to perform something (get all users for instance) that requires Management API use.
- **This is really where the magic happens** - Instead of your React app communicating directly with the Management API, it will communicate with your own API/Backend instead. Your API/Backend should take the query, make the necessary call to the Management API and then pass that response back to your React/SPA app.

The key here is that the backend process (M2M/Client Credentials Exchange) allows the Client Credentials to be abstracted from the SPA (public) app and safely used against the Management API.

Again, if all you need from the Management API is to get info about the current user and/or update the current user [metadata](https://auth0.com/docs/manage-users/user-accounts/metadata#manage-metadata), this can be accomplished from the React/SPA app directly as outlined [here](https://auth0.com/docs/quickstart/spa/react/02-calling-an-api).

Hope this helps!

---

_[View the full topic](https://community.auth0.com/t/is-the-only-way-to-obtain-a-management-api-token-via-copy-and-paste/86908)._
