Get File with API or WOPI

Do you want to: Ask a how-to question
For feature suggestions, describe the result you would like to achieve in detail: get file (content)
Community Server
Type of installation of Workspace (docker)
OS: Linux
I need to get content file by using API or WOPI. I already used this for token.
How i can do this? Whats request use?

Hello @arustamov
Please clarify your request. Do I understand it right that you need to get a file itself from your Workspace\Group installation? If so, please use authentication token with this request: ONLYOFFICE Api Documentation - Get file download link
If I misunderstood your request, please clarify it.

I have some problem…

Hello @arustamov
You don’t have to specify fileid in the parameters (your first screenshot). I just have checked this scenario, all things run smoothly. I’ve prepared a short demonstration, please take a look at it(I used Postman too): Monosnap

thank you! I am going to try to repeat your algorithm

Sure, feel free to contact us if you face any issues.

I set up this method. But I have a new problem. I cant download file without authorization. If I opened getting link in private window`s browser I cant to download this file. Error: lack of rights

If I opened getting link in private window`s browser I cant to download this file. Error: lack of rights

This is expected behavior. With mentioned method you obtain a link for authorized user.

There is a method without an authorized user?

Please take a look at this method: https://api.onlyoffice.com/portals/method/files/put/api/2.0/files/{fileid}/sharedlink
I hope it will be useful.

Unfortunately its dont help.
I send next request (add file). And get link: http://10.200.1.173/Products/Files/DocEditor.aspx?fileid=9&doc=OVR0dDUwazdWUDc2RG1pMUZyQWlSa3BKcjFOSzhHOEVLRXV2WVV5NjVOST0_Ijki0
Its link dont work in private window browser
Processing: Request2023-03-24_14-33-32.139.txt…

Please run the test one more time, but set it up like the following:

{
share: 2
}

Please let us know the result.