Skip to main content
Solved

Need help with creating Access token

  • February 14, 2025
  • 4 replies
  • 61 views

Forum|alt.badge.img+1

I have a Node.js application where I create a DocuSign envelope. Currently, I use the Authorization Code Grant flow to manually obtain the access token and refresh token. However, the refresh token expires every 30 days if not used. Is there an alternative method that would allow me to avoid manually generating a new access token and logging in each time the refresh token expires?

Best answer by JohnSantos

@anupk11 

Instead of using the Authorization Code Grant flow, which requires user interaction and has refresh tokens that expire after 30 days of inactivity, you can use the JWT (JSON Web Token) Grant authentication flow.

Since JWT tokens are short-lived, your application should automatically request a new one when needed

View Original
Is this content helpful?

4 replies

JohnSantos
Valued Contributor
Forum|alt.badge.img+18
  • Valued Contributor
  • 975 replies
  • Answer
  • February 14, 2025

@anupk11 

Instead of using the Authorization Code Grant flow, which requires user interaction and has refresh tokens that expire after 30 days of inactivity, you can use the JWT (JSON Web Token) Grant authentication flow.

Since JWT tokens are short-lived, your application should automatically request a new one when needed


Forum|alt.badge.img+1
  • Author
  • Newcomer
  • 3 replies
  • February 14, 2025
JohnSantos wrote:

@anupk11 

Instead of using the Authorization Code Grant flow, which requires user interaction and has refresh tokens that expire after 30 days of inactivity, you can use the JWT (JSON Web Token) Grant authentication flow.

Since JWT tokens are short-lived, your application should automatically request a new one when needed

Can you share some resource/docs for implementing jwt in nodejs?


JohnSantos
Valued Contributor
Forum|alt.badge.img+18
  • Valued Contributor
  • 975 replies
  • February 14, 2025

Forum|alt.badge.img+1
  • Author
  • Newcomer
  • 3 replies
  • February 14, 2025

Do I need to create a new app with JWT (JSON Web Token) Grant? Or can I change the existing application to use JWT?