Hi @H.Mir,
Welcome to the Auth0 Community and sorry for the late reply.
If you are using the client credentials flow with a M2M application, then this process should be automated if the token is requested properly from a secured space, that also contains a secret. I will recommend checking out this community post that goes over the aspects of it.
Otherwise using Refresh Tokens should be the way to go.
Hope this helps.
Thanks,
Remus