"How to Regenerate Access_Token using client_id and client_secret"

Hello Community,

Could anyone please tell me how to regenerate access_token without redirecting the user?

Case:
For the first time, I can generate access_token using code, client_id and client_secret, but this token expires in a few hours (don’t know how many hours) in that case how to regenerate access_token (and the expires time for access_token if possible) using the credentials which I already have such as client_id and client_secret.

Thanks in advance!


Here is my site Read-Only: LINK
(how to share your site Read-Only link)