About node auth0 SDK

Hi Team

I recently create a RESTful backend API, it can communicate with my Auth0 endpoint for client apps or users create, update etc. In this project, I create a logic for token reuse: if there is no token file store in my backend , then I need to get an access token and write it in the file and if the stored token doesn’t expire, then I will read the file and reuse the token. After this action done, for example, If I want to get all users information, I will pass the token to my getAllUsers function, and the functions using axios to call Auth0 endpoint. Everything works fine but my codes looks like too much.

I found if I choose node auth0 SDK which can make my codes more neat. That is great! I can use new ManagementClient(…).getClients().then() function to achieve same outcomes as above RESTful api function does.

But my question is, for the SDK getClients() function, it seems like call Auth0 endpoint and get access token automatically. In this case, if it will reuse the token until the token expires or it will get new access token each time when I run .getClients() function?

Please kindly advise.

Thanks for your help!