Using the WOPI protocol to integrate with Office for the web¶
You can use the Web Application Open Platform Interface (WOPI) protocol to integrate Office for the web with your application. The WOPI protocol enables Office for the web to access and change files that are stored in your service.
To integrate your application with Office for the web, you need to do the following:
Be a member of the Office 365 - Cloud Storage Partner Program. Currently integration with the Office for the web cloud service is available to cloud storage partners. You can learn more about the program, as well as how to apply, at https://developer.microsoft.com/office/cloud-storage-partner-program.
The Office 365 - Cloud Storage Partner Program is intended for independent software vendors whose business is cloud storage. It is not open to Office 365 customers directly.
Implement the WOPI protocol - a set of REST endpoints that expose information about the documents that you want to view or edit in Office for the web. The set of WOPI operations that must be supported is described in the section titled WOPI implementation requirements for Office for the web integration.
Read some XML from an Office for the web URL that provides information about the capabilities that Office for the web applications expose, and how to invoke them; this process is called WOPI discovery.
Provide an HTML page (or pages) that will host the Office for the web iframe. This is called the host page and is the page your users visit when they open or edit Office documents in Office for the web.
You can also optionally integrate your own UI elements with Office for the web. For example, when users choose Share in Office for the web, you can show your own sharing UI. These interaction points are described in the section titled Using PostMessage to interact with the Office for the web application iframe.
How to read this documentation¶
This documentation contains an immense amount of information about how to integrate with Office for the web, including details about how to implement the WOPI protocol, how Office for the web uses the protocol, how you can test your integration, the process for shipping your integration, and much more. It can be difficult to know where to begin. The following guidelines can help you find the specific sections in this documentation that will be most helpful to you.
If you want to know why Office integration may be useful to you, and what capabilities it provides, you should read the following sections:
Integrating with Office for the web - A high level overview of the scenarios enabled by Office for the web integration, as well as a brief description of some of the key technical elements in a successful integration.
Using the WOPI protocol to integrate with Office for the web - A brief description of the technical pieces that you must implement to integrate with Office for the web.
If you are an engineer about to begin implementing a WOPI host, you should first read the Key concepts section. When designing your WOPI implementation, you must keep in mind the expectations around file IDs, access tokens, and locks. These concepts are critical to a successful integration with Office for the web. You should also read the following sections:
If you are a back-end engineer, you should begin with the following sections in addition to the Key concepts section and other general sections listed above:
If you are a front-end engineer, you should begin with the following sections in addition to the Key concepts section and other general sections listed above:
Finally, if you are looking for more details about the process for shipping your integration, see the Shipping your Office for the web integration section.