{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":21490,"path":"integrate-applications/integration-hub/setup-docusign-authorization-code.md","title":"Set up Docusign eSignature spoke using authorization code grant","bundle":null,"doc_type":null,"release":"australia","body":"\n# Set up Docusign eSignature spoke using authorization code grant\n\nIntegrate the ServiceNow instance and Docusign eSignature spoke by using Authorization Code to authenticate ServiceNow requests.\n\n## Before you begin\n\n-   Request an Integration Hub subscription.\n-   Activate the Docusign eSignature spoke.\n-   Role required: admin\n\n**Important:** If you are setting up Docusign eSignature spoke using authorization code grant, you need not set up the spoke using JWT grant.\n\n## Configure the Docusign account\n\nConfigure a custom OAuth application from your Docusign account to enable authentication with the Docusign eSignature spoke.\n\n### About this task\n\nComplete these steps from your Docusign account. See the [Docusign Developer Center](https://developers.docusign.com/) documentation for instructions on creating and configuring custom applications. Docusign uses a scripted webhook to send signed document data to ServiceNow instance. This enables flow designers to pause a flow until a document is signed, and use document data in the flow.\n\n### Before you begin\n\nDocusign requirements:\n\n-   Docusign account\n-   Docusign app configured to integrate with ServiceNow\n-   Role required: Docusign administrator\n\n### Procedure\n\n1.  Log in to the [Docusign account](https://account-d.docusign.com/) as an admin.\n\n2.  From your Docusign account, register your application.\n\n    **Note:** Ensure that you select the **Authorization Code Grant** option for **User Application**.\n\n3.  Generate an integrator key and secret key.\n\n4.  Record the values of integrator key and secret key to register the app as a third-party OAuth provider on your ServiceNow instance.\n\n    You need these values when you [Configure the connection for Docusign eSignature spoke](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/integration-hub/setup-docusign-authorization-code.md).\n\n5.  Add the ServiceNow OAuth Redirect URL in your Docusign account.\n\n    1.  Navigate to **Integrations** &gt; **App and Keys**.\n\n    2.  Under **Apps and Integration Keys**,find the required app.\n\n    3.  For the required app, click the **Actions** drop-down list and click **Edit**.\n\n    4.  Under **Additional settings**, click **Add URI** and add the OAuth callback endpoint in this format: `https://<instance>.service-now.com/oauth_redirect.do`.\n\n        \\[Omitted image \"docusign-add-redirect-uri.png\"\\] Alt text: Add Redirect URI in Docusign account.\n\n6.  Obtain the value of **Account Base URI** from the Docusign account.\n\n    1.  Navigate to **Integrations** &gt; **App and Keys**.\n\n    2.  Under **My Account Information**, you can find the value of the **Account Base URI**.\n\n        \\[Omitted image \"docusign-acct-base-uri.png\"\\] Alt text: Account Base URI.\n\n    3.  Copy and record this value for later use.\n\n\n## Configure the connection for Docusign eSignature spoke\n\nIntegrate the ServiceNow instance and Docusign account instance using authorization code grant to authenticate ServiceNow requests.\n\n### Before you begin\n\nRole required: admin\n\n### Procedure\n\n1.  Navigate to **All** &gt; **Process Automation** &gt; **Workflow Studio**.\n\n2.  Click the **Integrations** tab.\n\n3.  Under **Connections**, toggle and enable the **Outbound** connections.\n\n4.  Locate the alias for Docusign and click **View Details**.\n\n    **Note:** Don't click Add Connection.\n\n    \\[Omitted image \"docusign-conn-template.png\"\\] Alt text: Connection template for Docusign eSignature spoke\n\n5.  If you are configuring the spoke for the first time, click **Configure**.\n\n    \\[Omitted image \"docusign-conn-tempte-config.png\"\\] Alt text: Configure a connection for the first time for Docusign eSignature spoke\n\n6.  On the Configure Connection form, fill in the fields.\n\n<table id=\"table_jlz_mjr_d1c\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nConnection Name\n\n</td><td>\n\nUnique name to identify the connection.\n\n</td></tr><tr><td>\n\nConnection URL\n\n</td><td>\n\n**Account Base URI** to connect to Docusign environment. This value can be obtained from your Docusign account. For more information see, [Configure the Docusign account](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/integration-hub/setup-docusign-authorization-code.md).\n\n</td></tr><tr><td>\n\nAPI Version\n\n</td><td>\n\nDocusign API version. The default value is v2.1.\n\n</td></tr><tr><td>\n\nAuthorization URL\n\n</td><td>\n\nDocusign authorization URL.-   For developer sandbox environment, enter `https://account-d.docusign.com/oauth/auth`.\n-   For live production system, enter `https://account.docusign.com/oauth/auth`.\n\n\n</td></tr><tr><td>\n\nToken URL\n\n</td><td>\n\nURL from which the ServiceNow instance obtains the access token.-   For developer sandbox environment, enter `https://account-d.docusign.com/oauth/token`.\n-   For live production system, enter `https://account.docusign.com/oauth/token`. For more information see, [Post Go-Live](https://developers.docusign.com/esign-rest-api/guides/post-go-live) and [User Info Endpoint Reference](https://developers.docusign.com/esign-rest-api/guides/authentication/user-info-endpoints) in the [Docusign Developer Center](https://developers.docusign.com/) documentation.\n\n\n</td></tr><tr><td>\n\nOAuth Client ID\n\n</td><td>\n\nIntegrator key of your Docusign account.\n\n</td></tr><tr><td>\n\nOAuth Client Secret\n\n</td><td>\n\nSecret key \\(client secret\\) of your Docusign account.\n\n</td></tr><tr><td>\n\nOAuth Redirect URL\n\n</td><td>\n\nOAuth callback endpoint in this format: `https://<instance>.service-now.com/oauth_redirect.do`.**Note:** Ensure that you add this URL in your Docusign account. For more information see, [Configure the Docusign account](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/integration-hub/setup-docusign-authorization-code.md).\n\n</td></tr></tbody>\n</table>    \\[Omitted image \"docusign-conf-temp.png\"\\] Alt text: Docusign connection.\n\n7.  Click **Configure and Get OAuth Token**.\n\n\n"}}