From d0e58004704a412a85f2402b925977d421437b8a Mon Sep 17 00:00:00 2001 From: Ihor Cherkashyn Date: Tue, 31 Mar 2026 17:35:51 +0200 Subject: [PATCH 1/2] Remove v2.x code --- .gitignore | 21 - LICENSE | 201 ---------- README.rst | 365 ------------------ examples/02_create_template.py | 75 ---- examples/03_template_invite.py | 37 -- examples/05_template_invite_multiple_roles.py | 43 --- examples/07_signing_link.py | 17 - examples/08_embedded_signing_link.py | 25 -- examples/09_request_payment_invite.py | 45 --- examples/101_invite_webhook_download.py | 85 ---- examples/11_add_fillable_fields.py | 67 ---- examples/12_upload_with_text_tags.py | 21 - examples/17_download_signed_document.py | 21 - examples/20_request_access_token.py | 13 - examples/21_free_form_invite.py | 31 -- examples/22_document_share_link.py | 18 - examples/23_document_merge.py | 20 - examples/24_document_history.py | 17 - examples/25_embedded_invite.py | 55 --- examples/common/TestDocument.pdf | Bin 33434 -> 0 bytes examples/common/documents_example.py | 135 ------- .../merged_document_name.pdf | Bin 67136 -> 0 bytes .../downloaded_documents/new_file_for_me.pdf | Bin 38703 -> 0 bytes examples/common/folder_example.py | 59 --- examples/common/link_example.py | 93 ----- examples/common/template_example.py | 128 ------ examples/common/testing123.pdf | Bin 12910 -> 0 bytes examples/common/webhook_example.py | 41 -- setup.cfg | 10 - setup.py | 23 -- signnow_python_sdk/__init__.py | 8 - signnow_python_sdk/config.py | 48 --- signnow_python_sdk/document.py | 334 ---------------- signnow_python_sdk/folder.py | 58 --- signnow_python_sdk/link.py | 27 -- signnow_python_sdk/oauth2token.py | 51 --- signnow_python_sdk/template.py | 115 ------ signnow_python_sdk/user.py | 50 --- signnow_python_sdk/webhook.py | 58 --- 39 files changed, 2415 deletions(-) delete mode 100644 .gitignore delete mode 100644 LICENSE delete mode 100644 README.rst delete mode 100644 examples/02_create_template.py delete mode 100644 examples/03_template_invite.py delete mode 100644 examples/05_template_invite_multiple_roles.py delete mode 100644 examples/07_signing_link.py delete mode 100644 examples/08_embedded_signing_link.py delete mode 100644 examples/09_request_payment_invite.py delete mode 100644 examples/101_invite_webhook_download.py delete mode 100644 examples/11_add_fillable_fields.py delete mode 100644 examples/12_upload_with_text_tags.py delete mode 100644 examples/17_download_signed_document.py delete mode 100644 examples/20_request_access_token.py delete mode 100644 examples/21_free_form_invite.py delete mode 100644 examples/22_document_share_link.py delete mode 100644 examples/23_document_merge.py delete mode 100644 examples/24_document_history.py delete mode 100644 examples/25_embedded_invite.py delete mode 100755 examples/common/TestDocument.pdf delete mode 100644 examples/common/documents_example.py delete mode 100644 examples/common/downloaded_documents/merged_document_name.pdf delete mode 100644 examples/common/downloaded_documents/new_file_for_me.pdf delete mode 100644 examples/common/folder_example.py delete mode 100644 examples/common/link_example.py delete mode 100644 examples/common/template_example.py delete mode 100644 examples/common/testing123.pdf delete mode 100644 examples/common/webhook_example.py delete mode 100644 setup.cfg delete mode 100644 setup.py delete mode 100644 signnow_python_sdk/__init__.py delete mode 100644 signnow_python_sdk/config.py delete mode 100644 signnow_python_sdk/document.py delete mode 100644 signnow_python_sdk/folder.py delete mode 100644 signnow_python_sdk/link.py delete mode 100644 signnow_python_sdk/oauth2token.py delete mode 100644 signnow_python_sdk/template.py delete mode 100644 signnow_python_sdk/user.py delete mode 100644 signnow_python_sdk/webhook.py diff --git a/.gitignore b/.gitignore deleted file mode 100644 index c5b92ce..0000000 --- a/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -# Compiled python modules. -*.pyc - -# Setuptools distribution folder. -/dist/ - -# Python egg metadata, regenerated from source files by setuptools. -/*.egg-info - -# virtualenv environment -/venv/ - -# Ignore pycharm idea folder. -/.idea/ - -# Ignore downloaded documents -/examples/downloaded_documents/ - -# Package build directory -/build/ - diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/README.rst b/README.rst deleted file mode 100644 index 4c2fdfb..0000000 --- a/README.rst +++ /dev/null @@ -1,365 +0,0 @@ -SignNow -======= - -SignNow Python SDK - -About SignNow -------------- - -SignNow is a powerful web-based e-signature solution that streamlines the signing process and overall document flow for businesses of any size. SignNow offers SaaS as well as public and private cloud deployment options using the same underlying API. With SignNow you can easily sign, share and manage documents in compliance with international data laws and industry-specific regulations. SignNow enables you to collect signatures from partners, employees and customers from any device within minutes. - -API Contact Information ------------------------ - -If you have questions about the SignNow API, please visit [https://help.signnow.com/docs](https://help.signnow.com/docs) or email [api@signnow.com](mailto:api@signnow.com). - -See additional contact information at the bottom. - -Installation -============ - -To install to Python library: - -:: - - pip install signnow-python-sdk - -Or clone the SignNow library and extract it into the location of your -choice. - -Navigate to the extracted file and run the following: - -:: - - python setup.py install - -Setup -===== - -.. code:: python - - import signnow_python_sdk - - signnow_python_sdk.Config(client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET", environment="production") - - Environments: - production - https://api.signnow.com - eval - https://api-eval.signnow.com - -Examples -======== - -To run the examples you will need an API key. You can get one here [https://www.signnow.com/api](https://www.signnow.com/api). For a full list of accepted parameters, refer to the SignNow REST Endpoints API guide: [https://help.signnow.com/docs](https://help.signnow.com/docs). - -OAuth2 -====== - -Request OAuth Token -------------------- - -.. code:: python - - access_token = signnow_python_sdk.OAuth2.request_token("YOUR USERNAME", "YOUR PASSWORD") - -Verify OAuth Token ------------------- - -.. code:: python - - access_token_verify = signnow_python_sdk.OAuth2.verify(AccessToken) - -User -==== - -Create New User ---------------- - -.. code:: python - - new_user = signnow_python_sdk.User.create("name@domain.com", "newpassword", "Firstname", "Lastname") - -Retreive User Account Information ---------------------------------- - -.. code:: python - - sn_user = signnow_python_sdk.User.get(access_token) - -Document -======== - -Get Document ------------- - -.. code:: python - - # without annotations - document_data = signnow_python_sdk.Document.get(access_token, "YOUR_DOCUMENT_ID") - - # with annotations - document_data = signnow_python_sdk.Document.get(access_token, "YOUR_DOCUMENT_ID", True) - -Create New Document -------------------- - -.. code:: python - - dir_path = os.path.dirname(os.path.realpath(__file__)) + '/testing123.pdf' - doc_id = signnow_python_sdk.Document.upload(access_token, dir_path, False) - -Create New Document and Extract the Fields ------------------------------------------- - -.. code:: python - - dir_path = os.path.dirname(os.path.realpath(__file__)) + '/testing123.pdf' - doc_id = signnow_python_sdk.Document.upload(access_token, dir_path) - -Update Document ---------------- - -.. code:: python - - update_payload = { - "texts": [ - { - "size": 22, - "x": 61, - "y": 72, - "page_number": 0, - "font": "Arial", - "data": "a sample text element", - "line_height": 9.075, - "client_timestamp": datetime.now().strftime("%s") - } - ], - fields: [ - { - "x": 10, - "y: 10, - "width": 122, - "height": 34, - "page_number": 0, - "role": "Buyer", - "required": True, - "type": "signature" - } - ] - } - - update_doc_res = signnow_python_sdk.Document.update(access_token, doc_id, update_payload) - -Delete Document ---------------- - -.. code:: python - - delete_doc_res = signnow_python_sdk.Document.delete(access_token, doc_id) - -Download Document ------------------ - -.. code:: python - - # without history - download_doc_res = signnow_python_sdk.Document.download(access_token, "YOUR DOCUMENT ID", "/", "sample") - - # with history - download_doc_res = signnow_python_sdk.Document.download(access_token, "YOUR DOCUMENT ID", "/", "sample", True) - -Send Free Form Invite ---------------------- - -.. code:: python - - invite_payload = new - { - "from": "account_email@domain.com", - "to": "name@domain.com" - } - - freeform_invite_res = signnow_python_sdk.Document.invite(access_token, "YOUR DOCUMENT ID", invite_payload) - -Send Role-based Invite ----------------------- - -.. code:: python - - invite_payload = { - "to": [ - { - "email": "name@domain.com", - "role_id": "", - "role": "Role 1", - "order": 1, - "authentication_type": "password", - "password": "SOME PASSWORD", - "expiration_days": 15, - "reminder": 5 - }, - { - "email": "name@domain.com", - "role_id": "", - "role": "Role 2", - "order": 2, - "authentication_type": "password", - "password": "SOME PASSWORD", - "expiration_days": 30, - "reminder": 10 - } - ], - "from": "your_account_email@domain.com", - "cc": [ - "name@domain.com" - ], - "subject": "YOUR SUBJECT", - "message": "YOUR MESSAGE" - }; - - role_based_invite_res = signnow_python_sdk.Document.invite(access_token, "YOUR DOCUMENT ID", invite_payload) - -Cancel Invite -------------- - -.. code:: python - - cancel_invite_res = signnow_python_sdk.Document.cancel_invite(access_token, "YOUR DOCUMENT ID"); - -Merge Existing Documents ------------------------- - -.. code:: python - - merge_doc_payload = { - "name": "My New Merged Doc", - "document_ids": ["YOUR DOCUMENT ID", "YOUR DOCUMENT ID"] - } - - merge_doc_res = signnow_python_sdk.Document.merge_and_download(access_token, mergeDocsObj, "/", "sample-merge"); - -Document History ----------------- - -.. code:: python - - doc_history_res = signnow_python_sdk.Document.get_history(access_token, "YOUR DOCUMENT ID"); - -Template -======== - -Create Template ---------------- - -.. code:: python - - new_template_res = signnow_python_sdk.Template.create(access_token, "YOUR DOCUMENT ID", "My New Template"); - -Copy Template -------------- - -.. code:: python - - copy_template_res = signnow_python_sdk.Template.copy(access_token, "YOUR TEMPLATE ID", "My Copy Template Doc"); - -Folder -====== - -+------------------------+-----------------------------------------------------------------------+ -| Filters | Values | -+========================+=======================================================================+ -| ``signing-status`` | ``waiting-for-me``, ``waiting-for-others``, ``signed``, ``pending`` | -+------------------------+-----------------------------------------------------------------------+ -| ``document-updated`` | ``datetime.now().strftime("%s")`` | -+------------------------+-----------------------------------------------------------------------+ -| ``document-created`` | ``datetime.now().strftime("%s")`` | -+------------------------+-----------------------------------------------------------------------+ - -+---------------------+--------------------+ -| Sort | Values | -+=====================+====================+ -| ``document-name`` | ``asc``/``desc`` | -+---------------------+--------------------+ -| ``updated`` | ``asc``/``desc`` | -+---------------------+--------------------+ -| ``created`` | ``asc``/``desc`` | -+---------------------+--------------------+ - -Get users root folder ---------------------- - -.. code:: python - - root_folder_Res = signnow_python_sdk.Folder.root_folder(access_token); - -Get Folder ----------- - -.. code:: python - - get_folder_res = signnow_python_sdk.Folder.get(access_token, "YOUR FOLDER ID"); - -Webhook -======= - -Create Webhook --------------- - -+-----------------------+-------------------------------------------------------------------------------------------------------------+ -| Events | Description | -+=======================+=============================================================================================================+ -| ``document.create`` | Webhook is triggered when a document is uploaded to users account in SignNow | -+-----------------------+-------------------------------------------------------------------------------------------------------------+ -| ``document.update`` | Webhook is triggered when a document is updated (fields added, text added, signature added, etc.) | -+-----------------------+-------------------------------------------------------------------------------------------------------------+ -| ``document.delete`` | Webhook is triggered when a document is deleted from | -+-----------------------+-------------------------------------------------------------------------------------------------------------+ -| ``invite.create`` | Webhook is triggered when an invitation to a SignNow document is created. | -+-----------------------+-------------------------------------------------------------------------------------------------------------+ -| ``invite.update`` | Webhook is triggered when an invite to Signnow document is updated. Ex. A signer has signed the document. | -+-----------------------+-------------------------------------------------------------------------------------------------------------+ - -.. code:: python - - createWebhookRes = signnow_python_sdk.Webhook.create(access_token, "document.create", "YOUR URL"); - -List Webhooks -------------- - -.. code:: python - - list_webhooks_res = signnow_python_sdk.Webhook.list_all(access_token); - -Delete Webhook --------------- - -.. code:: python - - delete_webhook_res = signnow_python_sdk.Webhook.delete(AccessToken, "YOUR WEBHOOK ID"); - -Link -==== - -Create Link ------------ - -.. code:: python - - create_link_res = signnow_python_sdk.Link.create(access_token, "YOUR DOCUMENT ID"); - -LICENSE -------- - -This project is released under the Apache 2.0 [License](https://github.com/signnow/SNPythonSDK/blob/master/LICENSE.md). - -Additional Contact Information -============================== - -SUPPORT -------- - -To contact SignNow support, please email [support@signnow.com](mailto:support@signnow.com). - -SALES ------ - -For pricing information please call (800) 831-2050 or email [sales@signnow.com](mailto:sales@signnow.com). diff --git a/examples/02_create_template.py b/examples/02_create_template.py deleted file mode 100644 index dbaca54..0000000 --- a/examples/02_create_template.py +++ /dev/null @@ -1,75 +0,0 @@ -import signnow_python_sdk -from datetime import datetime -import os - -if __name__ == '__main__': - signnow_python_sdk.Config(client_id="CLIENT_ID", - client_secret="CLIENT_SECRET", - environment="production") - - # Enter your own credentials - username = "USER_NAME" - password = "USER_PASSWORD" - - # Create access_token for the user - access_token = signnow_python_sdk.OAuth2.request_token(username, password, '*') - - # Upload a new document - dir_path = os.path.dirname(os.path.realpath(__file__)) + '/testing123.pdf' - doc_id = signnow_python_sdk.Document.upload(access_token['access_token'], dir_path) - - # Convert document to a template - template_id = signnow_python_sdk.Template.create(access_token['access_token'], doc_id['id'], "My New Template") - template_data = signnow_python_sdk.Document.get(access_token['access_token'], template_id['id']) - - # Create the PUT /document payload - doc_payload = { - "texts": [ - { - "size": 22, - "x": 61, - "y": 72, - "page_number": 0, - "font": "Arial", - "data": "a sample text element", - "line_height": 9.075, - "client_timestamp": datetime.now().strftime("%s") - } - ], - "fields": [ - { - "x": 61, - "y": 100, - "width": 120, - "height": 34, - "page_number": 0, - "role": "Signer 1", - "required": True, - "type": "signature" - }, - { - "x": 61, - "y": 160, - "width": 120, - "height": 12, - "page_number": 0, - "label": "New Label", - "role": "Signer 1", - "required": True, - "type": "text" - }, - { - "x": 61, - "y": 178, - "width": 41, - "height": 26, - "page_number": 0, - "role": "Signer 2", - "required": True, - "type": "initials" - } - ] - } - - # Add fields and texts to the template - put_doc_response = signnow_python_sdk.Template.update(access_token['access_token'], template_id['id'], doc_payload) diff --git a/examples/03_template_invite.py b/examples/03_template_invite.py deleted file mode 100644 index 9d1c732..0000000 --- a/examples/03_template_invite.py +++ /dev/null @@ -1,37 +0,0 @@ -import signnow_python_sdk - -if __name__ == '__main__': - signnow_python_sdk.Config(client_id="CLIENT_ID", - client_secret="CLIENT_SECRET", - environment="production") - - # Enter your own credentials - username = "USER_NAME" - password = "USER_PASSWORD" - template_id = "TEMPLATE_ID" - - # Create access_token for the user - access_token = signnow_python_sdk.OAuth2.request_token(username, password, '*') - - to = [{ - "email": "testemail@signnow.com", - "role_id": "", - "role": "Signer 1", - "order": 1 - }] - - invite_payload = { - "to": to, - "from": username - } - - # Create a document from the template - doc_id = signnow_python_sdk.Template.copy(access_token['access_token'], template_id, "New Doc From Template") - - # Get document data - document_data = signnow_python_sdk.Document.get(access_token['access_token'], doc_id['id']) - - # Send signature invite - invite_response = signnow_python_sdk.Document.invite(access_token['access_token'], doc_id['id'], invite_payload) - - diff --git a/examples/05_template_invite_multiple_roles.py b/examples/05_template_invite_multiple_roles.py deleted file mode 100644 index f4d0086..0000000 --- a/examples/05_template_invite_multiple_roles.py +++ /dev/null @@ -1,43 +0,0 @@ -import signnow_python_sdk - -if __name__ == '__main__': - signnow_python_sdk.Config(client_id="CLIENT_ID", - client_secret="CLIENT_SECRET", - environment="production") - - # Enter your own credentials - username = "USER_NAME" - password = "USER_PASSWORD" - template_id = "TEMPLATE_ID" - - # Create access_token for the user - access_token = signnow_python_sdk.OAuth2.request_token(username, password, '*') - - to = [{ - "email": "testemail@signnow.com", - "role_id": "", - "role": "Signer 1", - "order": 1 - }, - { - "email": "testemail1@signnow.com", - "role_id": "", - "role": "Signer 2", - "order": 2 - - }] - - invite_payload = { - "to": to, - "from": username - } - - # Create a document from the template - doc_id = signnow_python_sdk.Template.copy(access_token['access_token'], template_id, "New Doc From Template") - - # Get document data - document_data = signnow_python_sdk.Document.get(access_token['access_token'], doc_id['id']) - - # Send signature invite - invite_response = signnow_python_sdk.Document.invite(access_token['access_token'], doc_id['id'], invite_payload) - diff --git a/examples/07_signing_link.py b/examples/07_signing_link.py deleted file mode 100644 index 6948145..0000000 --- a/examples/07_signing_link.py +++ /dev/null @@ -1,17 +0,0 @@ -import signnow_python_sdk - -if __name__ == '__main__': - signnow_python_sdk.Config(client_id="CLIENT_ID", - client_secret="CLIENT_SECRET", - environment="production") - - # Enter your own credentials - username = "USER_NAME" - password = "USER_PASSWORD" - document_id = "DOCUMENT_ID" - - # Create access_token for the user - access_token = signnow_python_sdk.OAuth2.request_token(username, password, '*') - - # Create the signing link for a document. - link = signnow_python_sdk.Link.create(access_token['access_token'], document_id) diff --git a/examples/08_embedded_signing_link.py b/examples/08_embedded_signing_link.py deleted file mode 100644 index a9b4a0e..0000000 --- a/examples/08_embedded_signing_link.py +++ /dev/null @@ -1,25 +0,0 @@ -import signnow_python_sdk - -if __name__ == '__main__': - signnow_python_sdk.Config(client_id="CLIENT_ID", - client_secret="CLIENT_SECRET", - environment="production") - - # Enter your own credentials - username = "USER_NAME" - password = "USER_PASSWORD" - document_id = "DOCUMENT_ID" - - # Create access_token for the user - access_token = signnow_python_sdk.OAuth2.request_token(username, password, '*') - - # Create the signing links for a document. - signing_link = signnow_python_sdk.Link.create(access_token['access_token'], document_id) - - # Embed signing link to your website or share directly - ''' -