auth0/node-auth0

Invalid token for Automatic Management API Token Retrieval

vaclav-stummer opened this issue · 1 comments

Checklist

  • I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
  • I have looked into the API documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

According to the examples page. For automatic machine2machine connection is required only this:

var ManagementClient = require('auth0').ManagementClient;
var auth0 = new ManagementClient({
  domain: '{YOUR_ACCOUNT}.auth0.com',
  clientId: '{YOUR_NON_INTERACTIVE_CLIENT_ID}',
  clientSecret: '{YOUR_NON_INTERACTIVE_CLIENT_SECRET}',
  scope: 'read:users update:users',
});

I am getting an error: '{"statusCode":401,"error":"Unauthorized","message":"Invalid token","attributes":{"error":"Invalid token"}} with calling method ManagementClient.createPasswordChangeTicket. What could be wrong?

Reproduction

Call auth0 management with valid credentials. Exactly method ManagementClient.createPasswordChangeTicket

Additional context

No response

node-auth0 version

3.3.3 or 3.3.4

Node.js version

18.15.0

It seems that issue was within terraform configuration and grants