Management API get access token returns 401 error

I am trying to get an access token for the Management API in a NuxtJS app in a component mounted method following the Auth0 docs as below, with the relevant client ID and secret auto generated by the docs (obscured here), but get a 401 error ‘not authorised’, can anybody help as to where I may be going wrong?

mounted() {

const getToken = {
method: ‘POST’,
url: ‘’,
headers: {
‘content-type’: ‘application/x-www-form-urlencoded’
form: {
grant_type: ‘client_credentials’,
audience: ‘

        this.$axios(getToken).then((res) => {
        }).catch(function (error) {


1 Like

Hi @jamie.warnock,

Welcome to the Community!

You shouldn’t be passing secrets to your client side apps. In this case, you will want to proxy the request through a backend API.

Hope this helps!

1 Like

Hi Dan,

Thank you for your direction, it does help! does Auth0 have any tutorials on setting up a backend API, for instance a nodeJS express app? I will take a look of course, thanks again.


1 Like

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