PHP code example of veraandco / zoho-sign-php-sdk

1. Go to this page and download the library: Download veraandco/zoho-sign-php-sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

veraandco / zoho-sign-php-sdk example snippets


    $user = new OAuth( array(
        OAuth::CLIENT_ID => "",
        OAuth::CLIENT_SECRET => "",
        OAuth::DC => "COM", // allowed values : com/COM, in/IN, au/AU, eu/EU
        OAuth::REFRESH_TOKEN => "",
        OAuth::ACCESS_TOKEN => "" // optional. If not set, will auto refresh for access token
    ) );
    ZohoSign::setCurrentUser( $user );

 $user->generateAccessTokenUsingRefreshToken();

    $template = ZohoSign::getTemplate( 2000002608137 );
  
    $template->setPrefillBooleanField	( "Premium Partner", true );
    $template->setPrefillTextField ( "Company", "Incredibles Inc" );
    $template->setPrefillDateField ( "Date", "08 July 2020" );
  
    $template->getActionByRole("Partner")->setRecipientName("John");
    $template->getActionByRole("Partner")->setRecipientEmail("[email protected]");

    $resp_obj = ZohoSign::sendTemplate( $template, false );