{"id":25553897,"url":"https://github.com/docusign/connect-csharp-worker-aws","last_synced_at":"2025-07-21T13:34:21.984Z","repository":{"id":73373340,"uuid":"212667235","full_name":"docusign/connect-csharp-worker-aws","owner":"docusign","description":"Connect listener example for AWS: C# worker app","archived":false,"fork":false,"pushed_at":"2019-10-03T19:54:40.000Z","size":620,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-31T03:44:03.870Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/docusign.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-10-03T19:52:42.000Z","updated_at":"2022-05-14T08:31:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"fc563209-990d-4114-af79-a814b32bb3a8","html_url":"https://github.com/docusign/connect-csharp-worker-aws","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/docusign/connect-csharp-worker-aws","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docusign%2Fconnect-csharp-worker-aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docusign%2Fconnect-csharp-worker-aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docusign%2Fconnect-csharp-worker-aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docusign%2Fconnect-csharp-worker-aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/docusign","download_url":"https://codeload.github.com/docusign/connect-csharp-worker-aws/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docusign%2Fconnect-csharp-worker-aws/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266312120,"owners_count":23909744,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":[],"created_at":"2025-02-20T12:03:07.892Z","updated_at":"2025-07-21T13:34:21.976Z","avatar_url":"https://github.com/docusign.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# C#: Connect Worker for AWS\n\nRepository: [connect-csharp-worker-aws](https://github.com/docusign/connect-csharp-worker-aws)\n\n## Introduction\n\nThis is an example worker application for\nConnect webhook notification messages sent\nvia the [AWS SQS (Simple Queueing System)](https://aws.amazon.com/sqs/).\n\nThis application receives DocuSign Connect\nmessages from the queue and then processes them:\n\n* If the envelope is complete, the application\n  uses a DocuSign JWT Grant token to retrieve\n  the envelope's combined set of documents,\n  and stores them in the `output` directory.\n  \n   For this example, the envelope **must** \n   include an Envelope Custom Field\n   named `Sales order.` The Sales order field is used\n   to name the output file.\n\n## Architecture\n\n![Connect listener architecture](connect-csharp-worker-aws/common/Resources/connect_listener_architecture.png)\n\nAWS has [SQS](https://aws.amazon.com/tools/)\nSDK libraries for C#, Java, Node.js, Python, Ruby, C++, and Go. \n\n## Installation\n\n### Introduction\nFirst, install the **Lambda listener** on AWS and set up the SQS queue.\n\nThen set up this code example to receive and process the messages\nreceived via the SQS queue.\n\n### Installing the Lambda Listener\n\nInstall the example \n   [Connect listener for AWS](https://github.com/docusign/connect-node-listener-aws)\n   on AWS.\n   At the end of this step, you will have the\n   `Queue URL`, `Queue Region` and `Enqueue url` that you need for the next step.\n\n### Installing the worker (this repository)\n\n#### Requirements\nRequirements: C# and .NET Core 2.1 or later.\nThis repository has been tested as a Visual Studio 2017\nCommunity Edition solution.\n\n1. Download or clone this repository.\n\n1. Using AWS IAM, create an IAM `User` with access to your SQS queue.\n\n1. Configure the **App.config** file: [App.config](connect-csharp-worker-aws/App.config)\n    The application uses the OAuth JWT Grant flow.\n\n    If consent has not been granted to the application by\n    the user, then the application provides a url\n    that can be used to grant individual consent.\n\n    **To enable individual consent:** either\n    add the URL [https://www.docusign.com](https://www.docusign.com) as a redirect URI\n    for the Integration Key, or add a different URL and\n    update the `oAuthConsentRedirectURI` setting\n    in the `App.config` file.\n\n1.  Creating the Integration Key\n    Your DocuSign Integration Key must be configured for a JWT OAuth authentication flow:\n    * Create a public/private key pair for the key. Store the private key\n    in a secure location. You can use a file or a key vault.\n    * The example requires the private key. Store the private key in the\n    [App.config](connect-csharp-worker-aws/App.config) file.\n  \n    **Note:** the private key's second and subsequent\n    lines need to have a space added at the beginning due\n    to requirements from the Python configuration file\n    parser. Example:\n\n````\n# private key string\n# NOTE: the csharp config file parser requires that you \n# add \u0026#xA at the ending of every line of the multiline key value:  \nDS_PRIVATE_KEY=-----BEGIN RSA PRIVATE KEY-----\u0026#xA;\nMIIEowIBAAKCAQEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\u0026#xA;\nN7b6a66DYU8/0BwXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\u0026#xA;\n7lBHBbJcc76v+18XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\u0026#xA;\njCt15ZT4aux//2ZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\u0026#xA;\n....\nn80GP7CRK+Ge6IePzEPpg9XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\u0026#xA;\n-----END RSA PRIVATE KEY-----\u0026#xA;\n````  \n\n### The impersonated user's guid\nThe JWT will impersonate a user within your account. The user can be\nan individual or a user representing a group such as \"HR\".\n\nThe example needs the guid assigned to the user.\n\nThe guid value for each user in your account is available from\nthe DocuSign Admin tool in the **Users** section.\nTo see a user's guid, **Edit** the user's information.\nOn the **Edit User** screen, the guid for the user is shown as\nthe `API Username`.\n\n## Run the examples\n\nBuild, then run the solution to see its output.\n\n## Testing\nConfigure a DocuSign Connect subscription to send notifications to\nthe Cloud Function. Create / complete a DocuSign envelope.\nThe envelope **must include an Envelope Custom Field named \"Sales order\".**\n\n* Check the Connect logs for feedback.\n* Check the console output of this app for log output.\n* Check the `output` directory to see if the envelope's\n  combined documents and CoC were downloaded.\n\n  For this code example, the \n  envelope's documents will only be downloaded if\n  the envelope is `complete` and includes a \n  `Sales order` custom field, or if send from [SavingEnvelopeTest.cs](UnitTests/SavingEnvelopeTest.cs) unit test.\n\n## Unit Tests\nIncludes three types of testing:\n* [SavingEnvelopeTest.cs](UnitTests/SavingEnvelopeTest.cs) allow you to send an envelope to your amazon sqs from the program. The envelope is saved at `output` directory although its status is `sent`.\n\n* [RunTest.cs](UnitTests/RunTest.cs) divides into two types of tests, both submits tests for 8 hours and updates every hour about the amount of successes or failures that occurred in that hour, the differences between the two are:\n    * `few` - Submits 5 tests every hour.\n    * `many` - Submits many tests every hour.\n\nNote: Make sure that `UnitTests` uses a initialized config file.\n\nIn order to run the tests you need to open two windows of the program in Visual Studio, In the first one run the connect-csharp-worker-aws project. In the second window go to the `Test Explorer` choose the wanted test, right click on it and select `Run Selected Tests`.\n\n\n\n## Support, Contributions, License\n\nSubmit support questions to [StackOverflow](https://stackoverflow.com). Use tag `docusignapi`.\n\nContributions via Pull Requests are appreciated. Pull requests for the common\nfiles must be contributed to the \n[eg-01-csharp-jwt-common](https://github.com/docusign/eg-01-csharp-jwt-common)\nrepository.\nSee the [Contributing.md](https://github.com/docusign/eg-01-csharp-jwt-common/blob/master/docs/Contributing.md/)\nfile for information on contributing to this project.\n\nAll contributions must use the MIT License.\n\nThis repository uses the MIT license, see the\nLICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocusign%2Fconnect-csharp-worker-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdocusign%2Fconnect-csharp-worker-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocusign%2Fconnect-csharp-worker-aws/lists"}