I want to Connect Python to the OnlyOffice Document API

Hello OnlyOffice Community :slightly_smiling_face:

I am working on a project where I need to integrate OnlyOffice Document API into a Python application; My goal is to use OnlyOffice robust features to enable document editing and sharing within my application.

Here is information of my setup.
Development Environment= Windows 10 Python 3.9
OnlyOffice Version= Community Edition
Current Libraries Used= Requests, Flask

I have managed to set up the OnlyOffice server and can access the document editor through the web interface & I need to integrate it with my Python backend manage document creation, editing and saving.

I am facing some challenges :point_right:
How do I properly authenticate requests to the [OnlyOffice Document API using Python?
What is the best approach to create, open & save documents using the API? How can I enable real time collaboration features using the Document API with Python; I want multiple users to be able to edit documents simultaneously and see each other’s changes in real time. How can I handle callbacks from OnlyOffice in my Python application? I need to manage events like document save, close & editing completion :thinking:

Thank you in advance for your assistance. :pray:I want to your insights and suggestions to help me successfully integrate OnlyOffice with my Python application.

Best regards,
Amara

Hello @Amara

I believe those links were unintentional so I removed those. Let me know if I’m wrong.


In general, you can find all information and examples of how certain functionality works in Document Server in How it works section of our API.

In particular, according to your list, you should check these out for sure:

As for the callback, all information about utilization of Callback Handler is available here:

Note: By the end of this article you can also find examples of Callback Handler.


Summing this up, you can install and check out our test example on Python to see how integration works to take it as a reference to integrate editors in your own application.

This example is a simple DMS (Document Management System) developed to demonstrate how to integrate Document Server with your own application on Python.

I hope it brings more clarity on the process of integration.

Thank you for this information on the Callback Handler and the reference link to the API documentation :slightly_smiling_face:. I appreciate the suggestion to install and review the Python 2 test example for better understanding :+1:

I hope it helps.


We have noticed that you have provided links to third-party sites in this topic and one another that have to correlation with topics themselves. Please do not post such links as they are considered as spam. Thank you.