Integration of onlyoffice web with my Prject


I want to integrate my project with OnlyOffice docs web. I have download API in my Spring project, and I want to perform the following operations when the download API is called:

  1. Upload a file to OnlyOffice web.
  2. Generate a file shareable link with edit permission. This link will be accessible only to the person whose email ID is provided.

Regarding file upload, I found the API endpoint “/api/2.0/files/{folderID}/upload”. I want to confirm one thing: Is the folderID fixed, or will it change dynamically over time? If it’s not fixed, how can I obtain the folderID dynamically?

For generating a shareable link for a specific user, I found two API endpoints, but they don’t seem to be working as expected:

  1. “/api/2.0/people/email?email=%22useremail%22” (to get the user ID).
  2. “/api/2.0/files/file/{fileId}/share)” (to get the file shareable link).

Could you please provide guidance on how to correct these API calls?

Additionally, I would like to know how to build a plugin that will upload the current document to my own server’s API.

Hello @ajay

Please specify what ONLYOFFICE product you are using exactly, it’s quite unclear what do you mean by ‘OnlyOffice docs web’.

I am using the OnlyOffice web version for word documents. To fulfill my mentioned requirements, I have utilized the APIs provided in the DocSpace documentation.

Do you mean ONLYOFFICE Docs (Document Server)? If yes, then methods of DocSpace will not work with it. API of Document Server is located in different section:

You see, Document Server does not generate any sharable links to the documents since it does not store user data. This is a functionality of the DMS (Document Management System) with which Document Server is integrated.

For better understanding of how everything works in Document Server please refer to the How it works section of API: