I want to integrate Docusign with spring boot . i am using java 17 and spring boot 2.4.2 version and Docusign 3.18.0 . when i am creating a object of ApiClient and want to access token from apiClient.requestJWTUserToken . i am getting error and not able get the token . please help me if posiible.thanks in advance.
Page 1 / 1
Hi rahulmishra179,
Welcome to the DocuSign Community!
In order to assist you in a better way, it would be ideal for you to share the error you are having.
However, I share the documentation on how to use JWT in Java and how to obtain the access token in the following link
ApiClient apiClient = new ApiClient("https://demo.docusign.net/restapi");
apiClient.setOAuthBasePath("account-d.docusign.com");
ArrayList<String> scopes = new ArrayList<String>();
scopes.add("signature");
scopes.add("impersonation");
bytee] privateKeyBytes = Files.readAllBytes(Paths.get(prop.getProperty("rsaKeyFile")));
OAuthToken oAuthToken = apiClient.requestJWTUserToken(
prop.getProperty("clientId"),
prop.getProperty("userId"),
scopes,
privateKeyBytes,
3600);
String accessToken = oAuthToken.getAccessToken();
The above is an example of the code that is used in our SDK to obtain said access token, in this link you can obtain more information
Regards,
Eric | Docusign
Reply
Sign up
Already have an account? Login
You can login or register as either a Docusign customer or developer. If you don’t already have a Docusign customer or developer account, you can create one for free when registering.
Customer Login/Registration Developer Login/RegistrationDocusign Community
You can login or register as either a Docusign customer or developer. If you don’t already have a Docusign customer or developer account, you can create one for free when registering.
Customer Login/Registration Developer Login/RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.