Issues Integrating DOCS API with My Website for Document Editing

Hi ONLYOFFICE Community,

I’m working on integrating the ONLYOFFICE DOCS API into my CapCut website to allow users to edit documents directly within their browser. While most features are working, I’m encountering a few issues:

  1. When embedding the editor in an iframe, the document occasionally fails to load, showing a “connection lost” error.
  2. Changes made by users are not always saved back to the server, even though I’ve implemented the save callback as per the API documentation.
  3. I’m seeing CORS-related errors in the browser console, despite setting up the appropriate headers on my server.

Here’s what I’ve tried so far:

  • Verified that the ONLYOFFICE server is up and running without any network interruptions.
  • Cross-checked my implementation with the DOCS API documentation to ensure the configuration is correct.
  • Enabled debug logging on my server but didn’t find anything unusual.

Is there a specific configuration or additional headers required for stable integration? Could this be an issue with my server setup, or am I missing something in the DOCS API implementation?

I’d appreciate any guidance or examples of successful integrations!

Thanks in advance for your help!

Hello @joeroot
Please provide the following additional info:

  1. The version of the installed Document Server
  2. Type of the Document Server installation (deb/rpm, Docker, Windows Server)
  3. Document Server logs (/var/log/onlyoffice/documentserver, for Docker - inside the container; Windows Server - C:\Program Files (x86)\Ascensio System SIA\DocumentServer\Logs)
  4. Screenshots of DevTools → Console and Network tabs content when reproducing the issue