I am doing a rest call via axios to the management api. I have a m2m setup where my internal api service is needing a token to do mfa reset. I used the code that I found in the docs, Get Management API Access Tokens for Production, but its giving me the given error. My api is authorized for the Management Api, it has the client_grants enabled, and for other code I am able to use the ManagementClient object successfully. What could be the issue?
axios({
method: "POST",
url: `https://${AUTH0_DOMAIN}/oauth/token`,
headers: {'content-type': 'application/x-www-form-urlencoded'},
data: {
grant_type: 'client_credentials',
client_id: AUTH0_CLIENT_ID,
client_secret: AUTH0_CLIENT_SECRET,
audience: AUTH0_AUDIENCE
}
})