Embedded sending
With embedded sending, users embed the document sending interface of the ZohoSign to send the documents inside their website. Embedded sending allows to embed templates as well.
Params
access_token : OAuth access token generated from the refresh token. OAuth 2.0. This token is valid for one hour. Once expired, a new access token along with the refresh token needs to be obtained.
Note:
- If the OAuth token is generated with the allowed scopes like documents, templates, accounts, and users, the user who has access to the embedded sending URL can make operations on that particular scope that the permissions are granted.
- For example, if the accounts scope is passed while creating token, it will allow the user to view or update the Zoho Sign account settings.
- Make sure the token is generated for the same sender who sends out the document.
- If the admin's token is used by many users using this embedded sending feature , its equivalent to sharing the admin password to all those users(for 1hour validity).
org_id: You can get the Zoho Sign org ID API. In the below API response ZSOID can be retrieved, which is the org_id.
API Endpoints
https://sign.zoho.com/api/v1/currentuser
frameorigin: This is mandatory for iframe embedding and is optional for opening a new window.
The param should be passed like frameorigin=https://example.com
redirect_url : Once the document is submitted, we will redirect to this url if param is passed.
The param should be passed like redirect_url=https://example.com
Adding Trusted domain
The domain of both frameorigin and redirect_url(if different) must be added in Zoho Sign's trusted domain in this page
request_id : This is the request id of the document. Once the request is created, this will be available in the same response.
Embedded request URL
For Add/Modify recipients, documents
https://sign.zoho.com/zsi/[org_id]?frameorigin=https://example.com&redirect_url=https://example.com/success#/request/new/[request_id]
For Add/Modify recipient fields, document submission
https://sign.zoho.com/zsi/[org_id]?frameorigin=https://example.com&redirect_url=https://example.com/success#/request/viewer/[request_id]
Embedded template url
For Add/Modify recipients/documents
https://sign.zoho.com/zsi/[org_id]?frameorigin=https://example.com&redirect_url=https://example.com/success#/template/new/[request_id]
For Add/Modify recipient fields
https://sign.zoho.com/zsi/[org_id]?frameorigin=https://example.com&redirect_url=https://example.com/success#/template/viewer/[request_id]
For template document submission
https://sign.zoho.com/zsi/[org_id]?frameorigin=https://example.com&redirect_url=https://example.com/success#/template/send/[request_id]
Embedding script
var embed_url = "https://sign.zoho.com/zsi/12345?frameorigin=https://example.com#/request/new/1000001234567";
var params = {"access_token":"1000.fa6d5804b6d1113caef543207bf525fb.d7d0668c4b337b0dcf3a9f76bb3b115b","redirect_url":"https://example.com/success"};//No I18N
var form = document.createElement("form");
form.setAttribute("id", "dummyform");
form.setAttribute("method", "post");
form.setAttribute("action",embed_url);
form.setAttribute("target", "theFrame"); //Same iframe name given in html
//uncomment this if the url needs to be opened in new tab instead of iframe
//form.setAttribute("target", "_blank");
for (var i in params)
{
if (params.hasOwnProperty(i))
{
var input = document.createElement('input');
input.type = 'hidden';
input.name = i;
input.value = params[i];
form.appendChild(input);
}
}
document.body.appendChild(form);
var window_obj = jQuery(window);
var window_height = jQuery(window).height();
let window_width = jQuery(window).width();
let window_params = `scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no, width=`+window_width*0.7+`px,height=`+window_height*0.7+`,left=`+window_width*0.3+`px,top=`+window_height*0.3+`px`;
//uncomment this if the url needs to be opened in new tab instead of iframe
//var newWindow = window.open("","theFrame",params);
form.submit();
Show full
Show less