{"id":25553892,"url":"https://github.com/docusign/connect-php-worker-aws","last_synced_at":"2026-02-18T23:30:19.303Z","repository":{"id":43818365,"uuid":"212646915","full_name":"docusign/connect-php-worker-aws","owner":"docusign","description":"Connect listener example for AWS: PHP worker app","archived":false,"fork":false,"pushed_at":"2019-10-03T18:15:47.000Z","size":613,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-04-11T22:55:41.015Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","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}},"created_at":"2019-10-03T18:10:45.000Z","updated_at":"2022-07-07T21:46:52.000Z","dependencies_parsed_at":"2022-07-08T02:55:13.526Z","dependency_job_id":null,"html_url":"https://github.com/docusign/connect-php-worker-aws","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docusign%2Fconnect-php-worker-aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docusign%2Fconnect-php-worker-aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docusign%2Fconnect-php-worker-aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docusign%2Fconnect-php-worker-aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/docusign","download_url":"https://codeload.github.com/docusign/connect-php-worker-aws/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239833539,"owners_count":19704628,"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","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:01.110Z","updated_at":"2026-02-18T23:30:17.226Z","avatar_url":"https://github.com/docusign.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP: Connect Worker for AWS\n\nRepository: [connect-php-worker-aws](https://github.com/docusign/connect-php-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](demo_documents/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\n* PHP version 7.3.5 or later\n\n1. Download or clone this repository. Then:\n\n   ````\n   cd connect-php-worker-aws\n   composer install\n   ````\n1. Using AWS IAM, create an IAM `User` with access to your SQS queue.\n\n1. Configure the **ds_config.ini** file: [ds_config.ini](ds_config.ini)\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 ds_config.ini file.\n\n5.  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    [ds_config.ini](ds_config.ini) 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````  \nDS_PRIVATE_KEY=\"-----BEGIN RSA PRIVATE KEY-----\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n....\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXz1pr9mKfwmamtPXeMSJeEZUVmh7mNx\nPEHgznlGh/vUboCuA4tQOcKytxFfKG4F+jM/g4GH9z46KZOow3Hb6g==\n-----END RSA PRIVATE KEY-----\"  \n````  \n  \n## Run the examples\n\n````\nphp aws_worker.php\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.\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\nTo run the tests, split the terminal in two inside Visual Studio Code. In the first terminal run the connect-csharp-worker-aws program. In the second terminal choose the wanted test. You can see above at `Run the examples` part how the files can be run.\n\n**Note:** make sure your composer conatains:\n````\n    \"require-dev\": {\n        \"phpunit/phpunit\": \"8.3\"\n    }\n````   \nIf not, write in the terminal:\n```` \ncomposer require --dev phpunit/phpunit ^8.3\n````\n## Support, Contributions, License\n\nSubmit support questions to [StackOverflow](https://stackoverflow.com). Use tag `docusignapi`.\n\nContributions via Pull Requests are appreciated.\nAll contributions must use the MIT License.\n\nThis repository uses the MIT license, see the\n[LICENSE](https://github.com/docusign/connect-php-worker-aws/blob/master/LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocusign%2Fconnect-php-worker-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdocusign%2Fconnect-php-worker-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocusign%2Fconnect-php-worker-aws/lists"}