Co-edit Presentation

Purpose 

To co-edit or collaborate on a presentation in Zoho Show in real-time.

HTTP Request URL

https://{api.office-integrator_domain}/show/officeapi/v1/presentation

Request Parameters

ParameterValueDescription
Mandatory Parameter
apikey423s*****Uniquely identifies the web application in which the Show editor is integrated.
document

or

url
File

or

String
Method of providing the input file depending on its location.

document - if the input file is from your local drive or desktop.

url - if the input file is from a publicly accessible Web URL.
callback_settings

{
 "save_format":"zslides",
 "save_url":<Your Save URL>,
 "http_method_type": "post",
 "retries": <Integer>,
 "timeout": <Integer>,
 "save_url_params": {
                ....
         },

"save_url_headers": {
                <header_key1>: <value1>,
                <header_key2>: <value2>,
                 ….
        }
}

Using this param, you will be able to specify the following;

save_format -> Specify the output format in which the edited presentation needs to be saved.

save_url -> Provide your server location to which the latest content needs to be pushed back when the 'Save' is performed.

The below key values are optional;

http_method_type -> Specify the http method in which the save request has to be triggered.

retries -> Specify the number of retries required when the 'Save' fails.

timeout -> Specify the timeout for the given saveurl.

save_url_params -> To customize the output parameters in which the document details will be pushed from our end.

save_url_headers -> Specify the header key values that needs to be pushed back as request headers when the save is triggered.

Optional Parameters - Editor Customization
editor_settings{
 "language":"en"
}
Set interface language for the presentation.
permissions{
"document.export":true,
"document.print":true,
"document.edit":true
}
Define document permissions for user. Option to allow or revoke document "Export", "Print" and "Edit" access.
document_info{
"document_name":"New",
"document_id":"1349"
}
Set a unique id and specify display name of the presentation.
user_info{
"user_id":"9173",
"display_name":"Ken"
}
Identify the user in the collab presentation with "user_id" and "display_name".
passwordStringSpecify the password for the input file when importing a password-protected document using this parameter.

Note

Editor customization parameters and their values are case-sensitive.

Editor Customization Parameters

editor_settings

ParameterTypePossible ValuesDefault Value
languagestringen / de / es / fr / ja / nl more...en

permissions

ParameterTypePossible ValuesDefault Value
document.export   booleantrue / falsetrue
document.printbooleantrue / falsetrue
document.editbooleantrue / falsefalse

callback_settings

ParameterTypePossible ValuesDefault Value
Mandatory Keys
save_formatstringzslides / pptx / pps / ppsx / odp / sxi and more ...zslides
save_urlstringURL - Maximum length -> 65535URL
Optional Keys
save_url_paramsJSON
  • Maximum key count - 10
  • Allowed characters for <additional_user_key> - Alphabets, Numbers, Hyphen, Underscore and Dot. Maximum Length - 100 characters
  • Maximum length of <value> - 2500 characters
 
save_url_headersstring
  • Maximum key count - 10
  • Allowed characters for <additional_header_key> - Alphabets, Numbers, Hyphen, Underscore and Dot. Maximum Length - 100 characters
  • Maximum length of <value> - 500 characters
 
http_method_typestringpost / putpost
retriesinteger0 to 30
timeoutinteger1 to 120000 milliseconds120000

document_info

ParameterTypePossible ValuesDefault Value
document_idstring Alphabets, Numbers, Hyphen, Underscore and DotExample: abc_3
document_namestringSampleUntitled

user_info

ParameterTypePossible ValuesDefault Value
user_idinteger0358563264 
display_namestringKen/James/AdamGuest

 

Co-edit Presentation - Error Codes

CodeDescription
3802Unable to import
3835File size limit exceeded. The maximum allowed size is 100 MB
3842Invalid file extension

For a full list of error handling cases in Co-edit Presentation, refer here.

Note: 

To open a presentation in Co-view or collab view mode, please set 'document.edit:false' in "permissions" parameter section.

save_url usage:

Zoho Office Integrator allows partners and businesses to save the presentation content back to their specified storage server through "save_url" method.

A save_url is a publicly accessible webhook or a web URL to which Zoho will push the updated presentation content from Show editor to the partner's server.

In order to use the save_url method, partners should fulfill the below requirements:

  1. Partner's remote servers need to expose one of their ports - port 443 (HTTPS) or port 80 (HTTP) - from their location, for Zoho Show to push the data back.
  2. The save_url value specified in the HTTPS/HTTP POST request should be a proper domain name and publicly accessible over the web. Example: https://zylker.com/save.php

save_url_params usage:

By default, when the 'Save' is performed, we will be pushing back the information with the following key names:

Key NameTypeDescription
contentFileFile content will be pushed back in the form of bytes.
filenameStringPresentation name
formatStringSpecifies the format in which the presentation has been exported. 

If you wish to customize the above key names that you need to send back during save call, you can make use of the 'save_url_params' key inside 'callback_settings' parameter.

Once the 'save_url_params' key is configured, only the key values defined inside will be pushed back to your server. The default key names (like filename and format) will not be included. To include them, you need to define your own keys for format, filename and session_id by using the system variable $format$filename and $session_id respectively.

If the 'save_url_params' is passed as an empty JSON or the system variable $content is not configured, the file bytes will be pushed back with the multipart name 'content' by default.

Syntax:

"save_url_params": {
      <custom_content_key>: $content,
      <custom_format_key>: $format,
      <custom_filename_key>: $filename,
      <custom_sessionId_key>: $session_id,
      <additional_user_key>: <value>,
      <additional_user_key>: <value>,
      ....
      <additional_user_key>: <value>
      },

Example:

"save_url_params": {
      file: $content,
      extension: $format,
      presentation_name: $filename,
      session_id: $session_id,
      <additional_user_key>: <value>,
      <additional_user_key>: <value>
      },

In the above example, the file bytes will be pushed back in the multipart name 'file', file format in the key name 'extension', presentation filename in the key name 'presentation_name' and the file session id in the key name 'session_id'

Sample Request

Copiedcurl -X POST \
  https://api.office-integrator.com/show/officeapi/v1/presentation \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F apikey=423s***** \
  -F  document=@/Users/username/Presentation/Collab.pptx \
  -F 'editor_settings={'\''language'\'':'\''en'\''}' \
  -F 'permissions={'\''document.export'\'':true,'\''document.print'\'':true,'\''document.edit'\'':true}' \
  -F 'callback_settings={'\''save_format'\'':'\''pptx'\'','\''save_url'\'':'\''https://domain.com/save.php/'\''}' \
  -F 'document_info={'\''document_name'\'':'\''Collab'\'', '\''document_id'\'':1349}' \
  -F 'user_info={'\''user_id'\'':'\''9173'\'','\''display_name'\'':'\''Ken'\''}'	\
  -F password=a1b2c3****		
		

Sample Response

Copied{ 
"document_url": "https://api.office-integrator.com/show/officeapi/presentation/d26aa7b8029bf4f8d34c7dd0013939234a6e15dac88646f02a69582375b8da130efffac249d0erouae4667dcbcfb7ac1d/open",
"document_id": "1349", 
"save_url": "https://api.office-integrator.com/show/officeapi/presentation/d26aa7b8029bf4f8d34c7dd0013939234a6e15dac88646f02a69582375b8da130efffac249d086aae4667dcbcfb7ac1d/save", 
"session_id": "axxrd26aa7b8029bf4f8d34c7dd0013939234a6e15dac88646f02a69582375b8da130efffac249d086aae4667dcbac9p", 
"session_delete_url": "https://api.office-integrator.com/show/officeapi/v1/session/d26aa7b8029bf4f8d34c7dd0013939234a6e15dac88646f02a69582375b8da130efffac249d086aae4667dcbcfb7ac1d", 
"document_delete_url": "https://api.office-integrator.com/show/officeapi/v1/presentation/1349",
 }