Hi Thui,
I’m a Developer Support Engineer here to help you out.
I understand you want to obtain an access token programmatically without user interaction. There is a solution using scopes—these are essentially labels that define the permissions your app can have via the API. One particular scope, "extended," is relevant here and applies specifically to the Authorization Code Grant.
By using refresh tokens along with the extended scope, you can keep a user logged in indefinitely. This is achieved by requesting the extended scope and regularly refreshing the access token.
When you specify the extended scope, each time a refresh token is used, its validity is extended by 30 days.
I’ll send you an article that provides more detailed information on extended scopes and how to implement them.
https://community.docusign.com/esignature-api-63/programmatic-way-to-authenticate-and-send-out-pdfs-for-signing-20285
Best,
Dev/API Team