Share file
Overview
This task is used to share a specified file with other users.
Syntax
<response> = zoho.docs.shareFile(<fileID>, <emailID>, <permission>, <notify>, <message>);
where,
Parameter | Description | Description |
<response> | Variable which will hold the response returned by Zoho Docs. | KEY-VALUE |
<fileID> | ID of the file which will be shared. | TEXT |
<emailID> | Email address to which the file will be shared. | TEXT |
<permission> (optional) | Applicable values are:
| TEXT |
<notify> (optional) | The value true will send an email notification to the user with whom the file has been shared. By default, the value is false. | BOOLEAN |
<message> (optional) | Content of the notification email. | TEXT |
Example: Share a file
The following script shares the specified file in Zoho Docs with the specified user.
response= zoho.docs.shareFile("2cboca937f75ccbf9470191585448baa8d752", "john@zylker.com");
where,
"2cboca937f75ccbf9470191585448baa8d752"
"john@zylker.com"
Response
The success response returned is of the following format:
{
"response":[
"{\"uri\":\"/files/v1/share\"}",
"{\"message\":\"SHARED_DOCUMENT_SUCCESS\"}",
"{\"result\":[{\"shareduserlist\":\"xxx@zohocorp.com,\"}]}"
]
}