Skip to main content

 

Anybody is having issue retrieving the token Docusign.eSign version 8.0.0 on dot.net 4.8?

 aToken = docuSignClient.RequestJWTUserTokenAsync(clientId,
                                         impersonatedUserId,
                                         oAuthBaseUri,
                                         privateKeyBytes,
                                         tokenExpiry,
                                         scopes, token)

 Return aToken.Result ‘←- this never returns, neither the timeout token kick in. It’s stuck and go no where forever.

 

 

Figured out myself

 

This works :)

Dim result As Task(Of OAuthToken) = Task.Run(Async Function() As Task(Of OAuthToken)

                                                 Return Await docuSignClient.RequestJWTUserTokenAsync(clientId, UserID, OAuthBaseUri, privateKeyBytes, tokenExpiry, scopes)

                                             End Function, token)

jwt = result.Result

 

 

This doesn’t works :(

 Try

 


     aToken = docuSignClient.RequestJWTUserTokenAsync(clientId,
                                                 UserID,
                                                 OAuthBaseUri,
                                                 privateKeyBytes,
                                                 tokenExpiry,
                                                 scopes, token)

     jwt = aToken.Result


 Catch ex As Exception

     Throw New ApplicationException("Docusign could not generate JWT user token for" &
                                             " ClientID: " & clientId &
                                             " UserID: " & UserID &
                                             " ThumbPrint: " & RSAPrivateKeyThumbPrint, ex)

 End Try

 

 


Reply