1

Thank you for reading this question.

we wish to grand our users to fetch data from our servers using batch process.

they are using node.js.

this is what I have tried to do that with no success. can you help me, please?

var AuthenticationClient = require('auth0').AuthenticationClient;

var auth0 = new AuthenticationClient({
  domain: '...',
  clientId: '...'
});

var data = {
  username: 's@gmail.com  ',
  password: '*****'
};

console.log(auth0.oauth.oauth.token); //<---- undefined
auth0.oauth.token(data, function (err, userData) {
  if (err) {    // Handle error.  }
  console.log(userData);
});

Thank you so much

Shay_t
  • 163
  • 1
  • 16
  • You don't need the second oauth in console.log(auth0.oauth. **oauth** .token); – Mat J Jun 16 '20 at 08:02
  • @MatJ thank you. were you able to run this example? seems like token function auth0.oauth.token does not exist. how do I use this? – Shay_t Jun 16 '20 at 08:10

1 Answers1

2

go it. instead of using email and password.

I had to log in using client_id, client_secrect that was generated specifically for my customer. with specific privileges.

using the manage user interface under the API menu.

thank you all

Shay_t
  • 163
  • 1
  • 16