Get Started
Documentation
More information
|
BrowserWhen performing the client-side browser requests to ONLYOFFICE Document Server a token must be added to the parameters to validate the data. Opening fileWhen a file is opened for editing in ONLYOFFICE Document Server, the token must be added to the configuration to validate the parameters. The payload for the JWT token in the JSON format must have the same structure as the config. The parameter list to be signed is not strictly regulated, but we recommend that you specify the following parameters: { "document": { "fileType": "docx", "key": "Khirz6zTPdfd7", "permissions": { "download": true, "edit": true, "print": true, "review": true }, "title": "Example Document Title.docx", "url": "https://example.com/url-to-example-document.docx" }, "editorConfig": { "callbackUrl": "https://example.com/url-to-callback.ashx", "mode": "edit", "user": { "id": "78e1e841", "name": "Smith" } } } Where the example.com is the name of the server where document manager and document storage service are installed. See the How it works section to find out more on Document Server service client-server interactions. Sample token
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb2N1bWVudCI6eyJmaWxlVHlwZSI6ImRvY3giLCJrZXkiOiJLaGlyejZ6VFBkZmQ3IiwicGVybWlzc2lvbnMiOnsiZG93bmxvYWQiOnRydWUsImVkaXQiOnRydWUsInByaW50Ijp0cnVlLCJyZXZpZXciOnRydWV9LCJ0aXRsZSI6IkV4YW1wbGUgRG9jdW1lbnQgVGl0bGUuZG9jeCIsInVybCI6Imh0dHBzOi8vZXhhbXBsZS5jb20vdXJsLXRvLWV4YW1wbGUtZG9jdW1lbnQuZG9jeCJ9LCJlZGl0b3JDb25maWciOnsiY2FsbGJhY2tVcmwiOiJodHRwczovL2V4YW1wbGUuY29tL3VybC10by1jYWxsYmFjay5hc2h4IiwibW9kZSI6ImVkaXQiLCJ1c2VyIjp7Imdyb3VwIjoiR3JvdXAxIiwiaWQiOiI3OGUxZTg0MSIsIm5hbWUiOiJTbWl0aCJ9fX0.SHQ6p-yHw2yMoWsB7xB5sq12NSGxPrPHQ3bTgzy3OPE MethodsWhen calling the insertImage method to insert an image into the file, the token must be added to validate the parameters. The payload for the JWT token in the JSON format must have the same structure as the method parameter. The parameter list to be signed is not strictly regulated, but we recommend that you specify all the parameter sent: { "fileType": "png", "url": "https://example.com/url-to-example-image.png" } Where the example.com is the name of the server where document manager and document storage service are installed. See the How it works section to find out more on Document Server service client-server interactions. Sample token
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmaWxlVHlwZSI6InBuZyIsInVybCI6Imh0dHBzOi8vZXhhbXBsZS5jb20vdXJsLXRvLWV4YW1wbGUtaW1hZ2UucG5nIn0.FXuC3GUvPq3japwyzo4i-utUe3g1rfSDt1ytuK_VyCc When calling the setHistoryData method to view the document history version in ONLYOFFICE Document Server, the token must be added to validate the parameters. The payload for the JWT token in the JSON format must have the same structure as the method parameter. The parameter list to be signed is not strictly regulated, but we recommend that you specify all the parameter sent: { "changesUrl": "https://example.com/url-to-changes.zip", "key": "Khirz6zTPdfd7", "previous": { "key": "af86C7e71Ca8", "url": "https://example.com/url-to-the-previous-version-of-the-document.docx" }, "url": "https://example.com/url-to-example-document.docx", "version": 2 } Where the example.com is the name of the server where document manager and document storage service are installed. See the How it works section to find out more on Document Server service client-server interactions. Sample token
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjaGFuZ2VzVXJsIjoiaHR0cHM6Ly9leGFtcGxlLmNvbS91cmwtdG8tY2hhbmdlcy56aXAiLCJrZXkiOiJLaGlyejZ6VFBkZmQ3IiwicHJldmlvdXMiOnsia2V5IjoiYWY4NkM3ZTcxQ2E4IiwidXJsIjoiaHR0cHM6Ly9leGFtcGxlLmNvbS91cmwtdG8tdGhlLXByZXZpb3VzLXZlcnNpb24tb2YtdGhlLWRvY3VtZW50LmRvY3gifSwidXJsIjoiaHR0cHM6Ly9leGFtcGxlLmNvbS91cmwtdG8tZXhhbXBsZS1kb2N1bWVudC5kb2N4IiwidmVyc2lvbiI6Mn0.7gaOe1_4OvgRLYD0oGk_bMrVdPaLmgZVNIgQCUQdgoE When calling the setMailMergeRecipients method to insert recipient data for mail merge into the file, the token must be added to validate the parameters. The payload for the JWT token in the JSON format must have the same structure as the method parameter. The parameter list to be signed is not strictly regulated, but we recommend that you specify all the parameter sent: { "fileType": "xlsx", "url": "https://example.com/url-to-example-recipients.xlsx" } Where the example.com is the name of the server where document manager and document storage service are installed. See the How it works section to find out more on Document Server service client-server interactions. Sample token
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmaWxlVHlwZSI6Inhsc3giLCJ1cmwiOiJodHRwczovL2V4YW1wbGUuY29tL3VybC10by1leGFtcGxlLXJlY2lwaWVudHMueGxzeCJ9.P3TjOyX1Tv3xAVRAc8qtNb-uFLD6FH_WErag_rbI6nQ When calling the setRevisedFile method to select a document for comparing, the token must be added to validate the parameters. The payload for the JWT token in the JSON format must have the same structure as the method parameter. The parameter list to be signed is not strictly regulated, but we recommend that you specify all the parameter sent: { "fileType": "docx", "url": "https://example.com/url-to-example-document.docx" } Where the example.com is the name of the server where document manager and document storage service are installed. See the How it works section to find out more on Document Server service client-server interactions. Sample token
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmaWxlVHlwZSI6ImRvY3giLCJ1cmwiOiJodHRwczovL2V4YW1wbGUuY29tL3VybC10by1leGFtcGxlLWRvY3VtZW50LmRvY3gifQ.t8660n_GmxJIppxcwkr_mUxmXYtE8cg-jF2cTLMtuk8 |