I am working on a bulk user export script that will automatically send the information once a week. However, I am confused about using the bearer token in my requests. I understand that each request requires authentication in the header, but I am not sure how to save the token after I request it from the client to include in future requests. Could someone give me an explanation?
Can you provide more information? Specifically, how are you generating the bearer token?
See this page: https://auth0.com/docs/api/management/v2/tokens
And make sure you are using client credentials flow (aka M2M)
You shouldn’t be saving the token, you should be reauthenticating and using a short-lived token.