API vs WOPI
You can integrate ONLYOFFICE Docs with any cloud service using either API or WOPI.
The table below will help you find out the difference between these options.
| API | WOPI | |
|---|---|---|
| General info | Application Programming Interface: describes the main methods that allow you to interact with different ONLYOFFICE components, including editors, thus giving you programmatic access to it. Learn more | Web Application Open Platform Interface: REST-based protocol by Microsoft that defines a set of operations that enables a client to access and change files stored by a server. Learn more |
| Integration with sync&share and DMS solutions | Integration via ready-to-use connectors developed by ONLYOFFICE or its partners. Check all integrations | Integration via WOPI connector/universal WOPI client. |
| Collaboration (modes) | Switching between real-time and paragraph-locking co-editing modes. | Only real-time co-editing, switching between the modes is not available in the interface. |
| Customization | - Specifying the editor interface language - Specifying the editor interface theme - Disabling the chat functionality via the Chat menu button - Displaying the customer information in the editor About section - Editor customization is available through the parameters for controlling the toolbars appearance and hiding them, branding - Passing templates to create a new file - Passing a list of the recently opened files - Connecting plugins | - Specifying the editor interface language - Specifying the editor interface theme - Disabling the chat functionality via the Chat menu button - Displaying the customer information in the editor About section |
| Denying requests for resources | Configuring IPs of trusted integrators (white list) which requests ONLYOFFICE Docs can accept. | Configuring IPs of trusted integrators (white list) which requests ONLYOFFICE Docs can accept. |
| Restricting access to the use of ONLYOFFICE server | Editing access control is based on JWT signature. The secret key is required to generate a file open request. | No restrictions |
| Restricting access to data | Verification of request from the ONLYOFFICE server is based on the JWT signature. The request is signed with a secret key, and this allows making sure that it is not executed by a third-party. | Verification of request from the ONLYOFFICE server is based on the private key signing the request and a public key which is written in the proof-key element in the WOPI discovery XML. |
| Basic actions | The basic actions of viewing, editing, co-editing, mobile viewing and editing, embedded documents viewing are supported. | The basic actions of viewing, editing and co-editing are supported. |
| Additional actions through method calls | - Download request in a different format - Setting the Favorite status - Displaying tooltip with the message | No additional actions |
| Additional actions through event handling | - Closing the editor - Going to a file folder - Switching from the viewing into the editing mode - Renaming a file - Opening a dialog of sharing access settings - Opening the document version history - Inserting images from the storage - Mail merging - Comparison with a document from the storage - Getting the action link - Request to save a file in a different format - Getting a list of users for mentioning - Creating a new file | - Closing the editor - Going to a file folder - Switching from the viewing into the editing mode - Renaming a file - Opening a dialog of sharing access settings - Opening the document version history - Inserting images from the storage - Request to save a file in a different format |
| File lock | Getting a message with the document status informing about opening a file for editing, closing a file with no changes or closing a file which is ready for saving after editing. | - Locks file editing by an online office that requested the lock - Refreshes the lock on a file by resetting its automatic expiration timer to 30 minutes - Allows for file editing |
| File access rights | - Viewing - Editing - Reviewing (only for text documents) - Commenting - Filling forms (only for forms) - Modifying content controls (only for text documents) - Modifying filters (only for spreadsheets) - Copying to the clipboard - Downloading - Printing - Renaming | - Viewing - Editing - Reviewing (only for text documents) - Printing - Renaming |