# DocuSign

### Overview

The DocuSign integration enables discovery of identities, groups, and permissions within a DocuSign account. It uses Open Authorization API to create the following entities:

* Account → Custom Application
* UserGroups → Local Groups
* User → Local User
* Permission Profiles → Local Roles
* Permission Profiles → Custom Permissions

### Requirements

To set up the DocuSign integration in Veza, you will need to create a DocuSign app and configure Veza with the necessary credentials. This includes the Client ID, Client Secret, and Refresh Token. Additionally, you will need the base URI for DocuSign API calls.

#### Create a DocuSign App

Using a DocuSign developer account, [Create an App](https://developers.docusign.com/platform/configure-app/) and get the Client ID and Client Secret:

1. Go to **Apps and Keys** in DocuSign. Click **Add App and Integration Key**, and complete the required fields.
2. Under **Authentication**, click **Add Secret Key** and save it to use as **Client Secret**.
3. Save your changes and save the Integration Key to use as a **Client ID**.

### Obtain a Refresh Token

Get a Refresh Token, following the instructions in [How to get an access token with Authorization Code Grant](https://developers.docusign.com/platform/auth/confidential-authcode-get-token/). You will need to get an authorization code for the Veza app, and use it to request an access token.

The response will contain the **refresh token**:

```json
{
    "access_token": "ACCESS_TOKEN",
    "token_type": "Bearer",
    "refresh_token": "REFRESH_TOKEN",
    "expires_in": 28800
}
```

#### Retrieve the DocuSign Base URI

After obtaining an access token, you can retrieve your DocuSign base URI by making an API request:

```shell
curl --request GET https://account-d.docusign.com/oauth/userinfo
--header "Authorization: Bearer <ACCESS_TOKEN>"
```

Copy the `base_url` from the response.

### Configuring DocuSign on the Veza Platform

To enable Veza to gather data from DocuSign, follow these steps:

1. Log in to Veza and go to **Integrations**
2. In the main pane, click *Add Integration*. Click **DocuSign**.
3. Complete the required fields:

* **Name**: Friendly name to identify the DocuSign account in Veza
* **Base URL**: DocuSign Base URI. Example, `https://demo.docusign.net/restapi/`
* **Client ID**: Integration app Client ID
* **Client Secret**: Integration app Client Secret
* **Refresh Token**: Refresh Token for DocuSign API integration


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.veza.com/4yItIzMvkpAvMVFAamTf/integrations/integrations/docusign.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
