Download the PHP package skrek/zsign-php-sdk without Composer
On this page you can find all versions of the php package skrek/zsign-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download skrek/zsign-php-sdk
More information about skrek/zsign-php-sdk
Files in skrek/zsign-php-sdk
Package zsign-php-sdk
Short Description Zoho Sign's v1 api wrapper SDK in PHP
License
Homepage https://zoho.com.sign
Informations about the package zsign-php-sdk
PHP SDK for ZOHO SIGN
This SDK provides wrapper functions for Zoho Sign v1 API's Document Management and Template Management.
You can setup signing workflows using this SDK similar as in Zoho Sign UI.
Links : Zoho Sign API Guide & Zoho Sign API Documentation
Environment Set Up
PHP SDK is installable through composer
. Composer is a tool for dependency management in PHP. SDK expects the following from the client app.
Installation of SDK through composer
Install Composer(if not installed) Run this command to install the composer
curl -sS https://getcomposer.org/installer | php
To make the composer accessible globally, follow the instructions from the link below
To install composer on mac/ linux machine:
https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx
To install composer on windows machine:
https://getcomposer.org/doc/00-intro.md#installation-windows
Install PHP SDK
Install PHP SDK Here's how you install the SDK:
1) Navigate to the workspace of your client app 2) Run the command below:
composer require zoho-sign/php-sdk
Hence, the PHP SDK would be installed and a package named 'vendor' would be created in the workspace of your client app.
Registering a Zoho Client
Since Zoho CRM APIs are authenticated with OAuth2 standards, you should register your client app with Zoho. To register your app:
1) Visit this page https://accounts.zoho.com/developerconsole.
2) Click on Add Client ID
.
3) Enter Client Name, Client Domain and Redirect URI then click Create
.
4) Your Client app would have been created and displayed by now.
5) The newly registered app's Client ID and Client Secret can be found by clicking Options
→ Edit
.
(Options is the three dot icon at the right corner).
Initializing SDK
To import the classes used in SDK, use 'require_once' to include the 'autoload.php' created by composer
require 'vendor/autoload.php'
It is required to set the OAuth2 credentials of an user as the current user as a first step.
All subsequent api calls made will be made on behalf of this user The First time user permission authenticion/approval is to handled and the oauth credential storage has to be manually handled.
You can refresh & store the access_token as
Note : The OAuth credentials needs to storage(DB or file) needs to be logically handled manually
Class Heirarchy
- ZohoSign
- Oauth
- ApiClient
- SignException
- SignUtil
- Actions
- DocumentFormData
- Documents
- Fields
- AttachmentField
- CheckBox
- DateField
- DropdownField
- DropdownValues
- ImageField
- RadioField
- TextField
- TextProperty
- RequestType
- TemplateDocumentFields
- TemplateObject
SDK functions description
All functions for Document and Template management are available under 'ZohoSign.php' class
Document Management functions
Template Management functions
Exceptions
All functions of class 'ZohoSign' on event of bad/invalid requests to Zoho Sign throws class SignException. The Error message will be formatted like :
SIGN EXCEPTION : [error code] : error message
Examples
Below examples are assuming ZohoSign::currentUser is set.