{"id":28829332,"url":"https://github.com/ballerina-platform/module-ballerinax-docusign.dsadmin","last_synced_at":"2026-02-07T02:33:29.198Z","repository":{"id":219876602,"uuid":"750156205","full_name":"ballerina-platform/module-ballerinax-docusign.dsadmin","owner":"ballerina-platform","description":"The Ballerina DocuSign Admin module efficiently manages DocuSign users and permissions across all your accounts.","archived":false,"fork":false,"pushed_at":"2025-05-23T04:37:39.000Z","size":4462,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":50,"default_branch":"main","last_synced_at":"2025-07-27T03:51:07.786Z","etag":null,"topics":["ballerina","docusign","integration","wso2"],"latest_commit_sha":null,"homepage":"https://developers.docusign.com/docs/admin-api","language":"Ballerina","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ballerina-platform.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-01-30T04:55:14.000Z","updated_at":"2025-05-23T04:37:43.000Z","dependencies_parsed_at":"2024-03-14T07:24:13.858Z","dependency_job_id":"b3c8a2da-f793-4490-80b1-d8d9b33eb80a","html_url":"https://github.com/ballerina-platform/module-ballerinax-docusign.dsadmin","commit_stats":null,"previous_names":["ballerina-platform/module-ballerinax-docusign.dsadmin"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ballerina-platform/module-ballerinax-docusign.dsadmin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ballerina-platform%2Fmodule-ballerinax-docusign.dsadmin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ballerina-platform%2Fmodule-ballerinax-docusign.dsadmin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ballerina-platform%2Fmodule-ballerinax-docusign.dsadmin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ballerina-platform%2Fmodule-ballerinax-docusign.dsadmin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ballerina-platform","download_url":"https://codeload.github.com/ballerina-platform/module-ballerinax-docusign.dsadmin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ballerina-platform%2Fmodule-ballerinax-docusign.dsadmin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29184978,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T00:44:15.062Z","status":"online","status_checked_at":"2026-02-07T02:00:07.217Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ballerina","docusign","integration","wso2"],"created_at":"2025-06-19T05:12:58.551Z","updated_at":"2026-02-07T02:33:29.185Z","avatar_url":"https://github.com/ballerina-platform.png","language":"Ballerina","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ballerina Docusign Admin Connector\n\n[![Build](https://github.com/ballerina-platform/module-ballerinax-docusign.dsadmin/actions/workflows/ci.yml/badge.svg)](https://github.com/ballerina-platform/module-ballerinax-docusign.dsadmin/actions/workflows/ci.yml)\n[![GitHub Last Commit](https://img.shields.io/github/last-commit/ballerina-platform/module-ballerinax-docusign.dsadmin.svg)](https://github.com/ballerina-platform/module-ballerinax-docusign.dsadmin/commits/main)\n[![GitHub Issues](https://img.shields.io/github/issues/ballerina-platform/ballerina-library/module/docusign.dsadmin.svg?label=Open%20Issues)](https://github.com/ballerina-platform/ballerina-library/labels/module%2Fdocusign.dsadmin)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\n[DocuSign](https://www.docusign.com) is a digital transaction management platform that enables users to securely sign, send, and manage documents electronically.\n\nThe Ballerina DocuSign Admin connector integrates with the DocuSign platform, provides APIs to efficiently manages DocuSign users and permissions across all the accounts and domains within Ballerina applications. It supports [DocuSign Admin API V2](https://github.com/docusign/OpenAPI-Specifications/blob/master/admin.rest.swagger-v2.1.json).\n\n## Setup guide\n\nTo utilize the DocuSign Admin connector, you must have access to the DocuSign REST API through a DocuSign account.\n\n### Step 1: Create a DocuSign account\n\nIn order to use the DocuSign Admin connector, you need to first create the DocuSign credentials for the connector to interact with DocuSign.\n\n- You can [create an account](https://go.docusign.com/o/sandbox/) for free at the [Developer Center](https://developers.docusign.com/).\n\n    \u003cimg src=\"https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-docusign.dsadmin/main/ballerina/resources/create-account.png\" alt=\"Create DocuSign Account\" width=\"50%\"\u003e\n\n### Step 2: Create integration key and secret key\n\n1. **Create an integration key**: Visit the [Apps and Keys](https://admindemo.docusign.com/apps-and-keys) page on DocuSign. Click on `Add App and Integration Key,` provide a name for the app, and click `Create App`. This will generate an `Integration Key`.\n\n    \u003cimg src=\"https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-docusign.dsadmin/main/ballerina/resources/app-and-integration-key.png\" alt=\"Create Integration Key\" width=\"50%\"\u003e\n\n2. **Generate a secret key**: Under the `Authentication` section, click on `Add Secret Key`. This will generate a secret Key. Make sure to copy and save both the `Integration Key` and `Secret Key`.\n\n    \u003cimg src=\"https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-docusign.dsadmin/main/ballerina/resources/add-secret-key.png\" alt=\"Add Secret Key\" width=\"50%\"\u003e\n\n### Step 3: Generate refresh token\n\n1. **Add a redirect URI**: Click on `Add URI` and enter your redirect URI (e.g., \u003chttp://www.example.com/callback\u003e).\n\n    \u003cimg src=\"https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-docusign.dsadmin/main/ballerina/resources/add-redirect-uri.png\" alt=\"Add Redirect URI\" width=\"50%\"\u003e\n\n2. **Generate the encoded key**: The `Encoded Key` is a base64 encoded string of your `Integration key` and `Secret Key` in the format `{IntegrationKey:SecretKey}`. You can generate this in your web browser's console using the `btoa()` function: `btoa('IntegrationKey:SecretKey')`. You can either generate the encoded key from an online base64 encoder.\n\n3. **Get the authorization code**: Visit the following URL in your web browser, replacing `{iKey}` with your Integration Key and `{redirectUri}` with your redirect URI.\n\n    ```url\n    https://account-d.docusign.com/oauth/auth?response_type=code\u0026scope=signature%20organization_read%20group_read%20account_read%20permission_read%20user_read%20user_write\u0026client_id={iKey}\u0026redirect_uri={redirectUri}\n    ```\n\n    This will redirect you to your Redirect URI with a `code` query parameter. This is your `authorization code`.\n\n4. **Get the refresh token**: Use the following `curl` command to get the refresh token, replacing `{encodedKey}` with your Encoded Key and `{codeFromUrl}` with your `authorization code`.\n\n    ```bash\n    curl --location 'https://account-d.docusign.com/oauth/token' \\\n    --header 'Authorization: Basic {encodedKey}' \\\n    --header 'Content-Type: application/x-www-form-urlencoded' \\\n    --data-urlencode 'code={codeFromUrl}' \\\n    --data-urlencode 'grant_type=authorization_code'\n    ```\n\n    The response will contain your refresh token. Use `https://account-d.docusign.com/oauth/token` as the refresh URL.\n\nRemember to replace `{IntegrationKey:SecretKey}`, `{iKey}`, `{redirectUri}`, `{encodedKey}`, and `{codeFromUrl}` with your actual values.\n\nAbove is about using the DocuSign Admin API in the developer mode. If your app is ready to go live, you need to follow the guidelines given [here](https://developers.docusign.com/docs/admin-api/go-live/) to make it work.\n\n## Quickstart\n\nTo use the DocuSign Admin connector in your Ballerina project, modify the `.bal` file as follows.\n\n### Step 1: Import the module\n\nImport the `ballerinax/docusign.dsadmin` module into your Ballerina project.\n\n```ballerina\nimport ballerinax/docusign.dsadmin;\n```\n\n### Step 2: Instantiate a new connector\n\nCreate a `dsadmin:ConnectionConfig` with the obtained OAuth2.0 tokens and initialize the connector with it.\n\n```ballerina\nconfigurable string clientId = ?;\nconfigurable string clientSecret = ?;\nconfigurable string refreshToken = ?;\nconfigurable string refreshUrl = ?;\n\ndsadmin:Client docuSignClient = check new({\n    auth: {\n        clientId,\n        clientSecret,\n        refreshToken,\n        refreshUrl\n    }\n});\n```\n\n### Step 3: Invoke the connector operation\n\nYou can now utilize the operations available within the connector.\n\n```ballerina\npublic function main() returns error? {\n\n    dsadmin:OrganizationsResponse orgResponse = check docuSignClient-\u003e/v2/organizations();\n\n    dsadmin:OrganizationResponse[]? organizations = orgResponse.organizations;\n    dsadmin:OrganizationResponse organization = organizations[0];\n\n    dsadmin:NewUserResponse newUserResponse = check docuSignClient-\u003e/v2/organizations/[\u003cstring\u003eorganization.id]/users.post(\n        {\n            user_name: \"user1\",\n            first_name: \"name1\",\n            email: \"user1@docusignmail.com\",\n            accounts: [\n                {\n                    id: accountId,\n                    company_name: \"Company\"\n                }\n            ]\n        }\n    );\n}\n```\n\n### Step 4: Run the Ballerina application\n\nUse the following command to compile and run the Ballerina program.\n\n```bash\nbal run\n```\n\n## Examples\n\nThe DocuSign Admin connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/ballerina-platform/module-ballerinax-docusign.dsadmin/tree/main/examples).\n\n1. [Manage user information with DocuSign Admin](https://github.com/ballerina-platform/module-ballerinax-docusign.dsadmin/tree/main/examples/manage-user-information)\n    This example shows how to use DocuSign Admin API to to create users and retrieve user informations related to eSignature tasks.\n\n2. [Access permissions in user accounts](https://github.com/ballerina-platform/module-ballerinax-docusign.dsadmin/tree/main/examples/permissions-in-organizations)\n    This example shows how to use DocuSign Admin API to to view permission details of the user accounts.\n\n## Issues and projects\n\nThe **Issues** and **Projects** tabs are disabled for this repository as this is part of the Ballerina library. To report bugs, request new features, start new discussions, view project boards, etc., visit the Ballerina library [parent repository](https://github.com/ballerina-platform/ballerina-library).\n\nThis repository only contains the source code for the package.\n\n## Building from the source\n\n### Prerequisites\n\n1. Download and install Java SE Development Kit (JDK) version 17. You can download it from either of the following sources:\n\n   - [Oracle JDK](https://www.oracle.com/java/technologies/downloads/)\n   - [OpenJDK](https://adoptium.net/)\n\n    \u003e **Note:** After installation, remember to set the `JAVA_HOME` environment variable to the directory where JDK was installed.\n\n2. Download and install [Ballerina Swan Lake](https://ballerina.io/).\n\n3. Download and install [Docker](https://www.docker.com/get-started).\n\n    \u003e **Note**: Ensure that the Docker daemon is running before executing any tests.\n\n4. Generate a Github access token with read package permissions, then set the following `env` variables:\n\n    ```bash\n   export packageUser=\u003cYour GitHub Username\u003e\n   export packagePAT=\u003cGitHub Personal Access Token\u003e\n    ```\n\n### Build options\n\nExecute the commands below to build from the source.\n\n1. To build the package:\n\n   ```bash\n   ./gradlew clean build\n   ```\n\n2. To run the tests:\n\n   ```bash\n   ./gradlew clean test\n   ```\n\n3. To build the without the tests:\n\n   ```bash\n   ./gradlew clean build -x test\n   ```\n\n4. To debug package with a remote debugger:\n\n   ```bash\n   ./gradlew clean build -Pdebug=\u003cport\u003e\n   ```\n\n5. To debug with Ballerina language:\n\n   ```bash\n   ./gradlew clean build -PbalJavaDebug=\u003cport\u003e\n   ```\n\n6. Publish the generated artifacts to the local Ballerina central repository:\n\n   ```bash\n   ./gradlew clean build -PpublishToLocalCentral=true\n   ```\n\n7. Publish the generated artifacts to the Ballerina central repository:\n\n   ```bash\n   ./gradlew clean build -PpublishToCentral=true\n   ```\n\n## Contributing to Ballerina\n\nAs an open source project, Ballerina welcomes contributions from the community.\n\nFor more information, go to the [contribution guidelines](https://github.com/ballerina-platform/ballerina-lang/blob/master/CONTRIBUTING.md).\n\n## Code of conduct\n\nAll contributors are encouraged to read the [Ballerina Code of Conduct](https://ballerina.io/code-of-conduct).\n\n## Useful links\n\n- Discuss code changes of the Ballerina project in [ballerina-dev@googlegroups.com](mailto:ballerina-dev@googlegroups.com).\n- Chat live with us via our [Discord server](https://discord.gg/ballerinalang).\n- Post all technical questions on Stack Overflow with the [#ballerina](https://stackoverflow.com/questions/tagged/ballerina) tag.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fballerina-platform%2Fmodule-ballerinax-docusign.dsadmin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fballerina-platform%2Fmodule-ballerinax-docusign.dsadmin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fballerina-platform%2Fmodule-ballerinax-docusign.dsadmin/lists"}