Skip to main content

Question about docusign package.

I have successfully started a session with correct Integration Key, API account ID, secret key and RSA Keypairs.

However, the second command “send envelope” is failed, the error message said “access token expired”

And there is no command in regards to grant a token from Docusign.

Did I miss something from bot store?

Thanks, 

That’s an interesting question, Joe_Zhou at Insignia !

I think the following community members may be able to help 

@Marc Mueller 

@Vatsy 

@Zaid Chougle 

@Tamil Arasu10 

@madhu subbegowda 

@jackson 

@HARUN KUMAR 

@NewTushitha 

@Azhar Hossain 

@kdil 

@Padmakumar 


Hi ​@Joe_Zhou at Insignia 

  1. Immediately follow “Start Session” with “Send Envelope”
    • Ensure there’s no delay or long-running logic between the two commands.
    • Token generation happens at session initiation — so use it quickly.
  2. Manually implement token refresh using REST API
    • If the package does not cover token grant/refresh, you can use REST Web Service actions in AA to:
      • Call DocuSign’s /oauth/token endpoint
      • Use JWT Grant flow with:
        • Integration Key (Client ID)
        • RSA Private Key
        • User ID
        • Auth server:  https://account.docusign.com/oauth/token
    • Store the token and pass it manually via headers (if doing custom REST calls).
  3. Check if using correct authentication method
    • Ensure you’re using JWT Grant Authentication (recommended for bots)
    • If using Authorization Code Grant (3-legged OAuth), token refresh logic is mandatory and manual.

 

If you need more control, consider bypassing the Bot Store package and using:

  • REST Web Service actions for all DocuSign operations (send envelope, get status, etc.)
  • This gives full control over token management, headers, and payloads.

Reply