Retrieve (OnlyOffice) local file context menu "direct edit" URLs

Note: Not sure if the following option is only available when there is an OnlyOffice connector in place.
If you right click a local file within nextcloud clients folder, I get the option to directly open said local file in the browser editor of OnlyOffice.
See here: How to edit with ONLYOFFICE within Nextcloud Desktop | ONLYOFFICE Blog

It seems that this works even when I’m not logged in to nextcloud with the browser. However, the edit option generates different links depending on whether I’m logged in or not.

I’d like to script a small wrapper which decides whether or not a local file should be opened via the OnlyOffice online browser or via a local (MS) Office installation but for that, I’d need these direct editing links.

Is there any way to retrieve one or both of these URL(s)?
And/or can I somehow detemine the file ids based on the local files to build a direct edit link myself?

Thanks

Unfortunately, I cannot give you a final answer to your problem. I have some ideas how you could tackle it though.

  1. The connector is open source, is it not? You could search the source code and look for the URL building routines.
  2. Do you know the URL that is opened? Can you manually decode it, eventually?
  3. You could look at the files app what endpoints are availabe (does not solve the ID problem) and how to obtain the files accordingly.

Maybe that gives you a first idea to tackle your problem. Sorry for not being of more concrete help.