To use the DocuSign connector, add the <docusign.init>
element in your configuration before any other DocuSign operations. This configuration authenticates with DocuSign by configuring the user credentials using OAuth2 authentication for accessing the DocuSign account.
Note
In this connector, we have two authentication flow. First one is the Legacy Header Authentication and another one is oAuth.
If you use Legacy Header Authentication use the init method as below.
<docusign.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <apiVersion>{$ctx:apiVersion}</apiVersion> <integratorKey>{$ctx:integratorKey}</integratorKey> <userName>{$ctx:userName}</userName> <password>{$ctx:password}</password> <blocking>{$ctx:blocking}</blocking> </docusign.init>
Properties
apiUrl:
Base endpoint URL to access the DocuSign API.apiVersion
: The version of the DocuSign API.integratorKey
:
The client application's integration key.username
: The username of the DocuSign account.password
: The password of the DocuSign account.blocking
: Boolean type, this property helps the connector perform blocking invocations to DocuSign.
If you use oAuth Authentication use the init method as below. Here you can get the accessToken form getOAuthToken method.
<docusign.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <apiVersion>{$ctx:apiVersion}</apiVersion> <accessToken>{$ctx:accessToken}</accessToken> <blocking>{$ctx:blocking}</blocking> </docusign.init>
Properties
apiUrl:
Base endpoint URL to access the DocuSign API.apiVersion
: The version of the DocuSign API.
OAuth Token to send and manipulate data of DocuSign API.accessToken:
blocking
: Boolean type, this property helps the connector perform blocking invocations to DocuSign.
To get the OAuth access token add the <docusign.getOAuthToken>
element before the <docusign.init>
element in your configuration.
<docusign.getOAuthToken> <grantType>{$ctx:grantType}</grantType> <clientId>{$ctx:clientId}</clientId> <username>{$ctx:username}</username> <password>{$ctx:password}</password> <scope>{$ctx:scope}</scope> </docusign.getOAuthToken>
Properties
grantType:
Use password as grantType.clientId
: The client application’s integrator key set as clientId.username
: The username of the DocuSign account.password
: The password of the DocuSign account.scope
: The scope is always set to "api".
Note
The access token is valid in all future API calls to authenticate this user, until the token is revoked. It is not affected by password changes. The client application is responsible for storing and protecting this token.
To revoke an authorization token, use the <docusign.revokeOAuthToken>
element in your configuration.
<docusign.revokeOAuthToken> <accessToken>{$ctx:accessToken}</accessToken> </docusign.revokeOAuthToken>
Properties
accessToken
: The access token that is to be revoked.
To get the login information, use the <docusign.getOAuthToken>
element in your configuration. This operation retrieves account information for the authenticated user. It does not actually log you in. Instead, it returns information about the account or accounts that the authenticated user has access to.
<docusign.getLoginInformation> <includeApiPassword>{$ctx:includeApiPassword}</includeApiPassword> <includeAccountIDGuid>{$ctx:includeAccountIDGuid}</includeAccountIDGuid> <loginSetting>{$ctx:loginSetting}</loginSetting> </docusign.getLoginInformation>
Properties
includeApiPassword
: (optional) When set to true, returns api_password in the response.includeAccountIDGuid
: (optional) When set to true, shows the account ID GUID in the response.loginSetting
: (optional) Determines whether login settings are returned in the response (valid values:all
,none
).
Additional information
Ensure that the following Axis2 configurations are added and enabled.
Required message formatters
<messageFormatter contentType="application/pdf" class="org.wso2.carbon.relay.ExpandingMessageFormatter"/>
Required message builders
<messageBuilder contentType="application/pdf" class="org.wso2.carbon.relay.BinaryRelayBuilder"/>
Follow the below-mentioned steps to add a valid certificate to access DocuSign API over https.
- Download the certificate by clicking Demo SSL Certificate link by navigating to 'https://trust.docusign.com/en-us/trust-certifications/docusign-public-certificates/'
- Place the downloaded certificate into "<ESB_HOME>/repository/resources/security/" folder.
Navigate to "<ESB_HOME>/repository/resources/security/" using the command prompt and execute the following command.
keytool -importcert -file CERT_FILE_NAME -keystore client-truststore.jks -alias "CERT_NAME"
This command will import DocuSign certificate into keystore.To import the certificate give "wso2carbon" as password. Press "Y" to complete certificate import process.
Note
- CERT_FILE_NAME - Replace CERT_FILE_NAME with the file name that was extracted from DocuSign with the extension (e.g. demo.docusign.net.crt).
- CERT_NAME - Replace CERT_NAME with name for the certificate (e.g. demo.docusign.net).
Now that you have connected to DocuSign, use the information in the following topics to perform various operations with the connector.