# Need urgent help. Proxy a request

**URL:** <https://community.auth0.com/t/need-urgent-help-proxy-a-request/86236>\
**Category:** Get Help\
**Created:** [June 30, 2022, 11:25am UTC](https://community.auth0.com/t/need-urgent-help-proxy-a-request/86236 "2022-06-30T11:25:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![benjamin203](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/benjamin203/32/38437_2.png) [@benjamin203](https://community.auth0.com/u/benjamin203)\
**Post date:** [June 30, 2022, 11:25am UTC](https://community.auth0.com/t/need-urgent-help-proxy-a-request/86236/1 "2022-06-30T11:25:26Z")

</div>

I need to let the users of my SPA change their metadata. But it is not reccomended to store Access API Token on the front end. In the following post: [SPA - User update own user metadata](https://community.auth0.com/t/spa-user-update-own-user-metadata/63410)

A response said the following could be an alternative:

“Alternatively, you can proxy the request in your own API. You would set up a machine-to-machine application for your API so that it could obtain an Access Token from the Management API using the client credentials grant.”

Can someone please specify how to go about this? There is no tutorial or resource.

---

<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 1, 2022, 6:22pm UTC](https://community.auth0.com/t/need-urgent-help-proxy-a-request/86236/2 "2022-07-01T18:22:27Z")

</div>

Hi there @benjamin203!

> [@benjamin203](#):
>
> Can someone please specify how to go about this? There is no tutorial or resource

While I’m unaware of a step by step guide for this specific use case, however this post outlines what you are looking for:

> [@Calling management API to update user meta data from SPA](https://community.auth0.com/t/calling-management-api-to-update-user-meta-data-from-spa/64600/5):
>
> Glad to hear it is working for you! An alternative approach would be to handle the calls to the Management API in your backend. You would [register your API](https://auth0.com/docs/get-started/set-up-apis) as a custom API and use its identifier as the audience in the SPA. You would then create a Machine-to-Machine application for your backend and authorize it to use the Management API. Your backend could use one of the [Auth0 SDKs](https://auth0.com/docs/quickstart/backend) to validate the Access Token and return data from the Management API for the SPA. That way any Access Tokens for th…

Some more resources that may be helpful:

> **[Register Machine-to-Machine Applications](https://auth0.com/docs/get-started/auth0-overview/create-applications/machine-to-machine-apps)**
>
> Learn how to register and configure a machine-to-machine (M2M) application using the Auth0 Dashboard and authorize it using the Management API test feature.

> **[Solution Overview (Server Apps + API)](https://auth0.com/docs/get-started/architecture-scenarios/server-application-api/part-1#client-credentials-grant)**
>
> Solutions Overview for the Server + API architecture scenario

> **[Using Machine to Machine (M2M) Authorization](https://auth0.com/blog/using-m2m-authorization/)**
>
> How to set up non-interactive apps using the client credentials grant and Auth0 to perform IoT device, CLI tool, and more machine to mach...

Hope this helps at least get you going in the right direction!

---

<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 16, 2022, 10:05pm UTC](https://community.auth0.com/t/need-urgent-help-proxy-a-request/86236/4 "2022-07-16T22:05:04Z")

</div>

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