Internal links and webdav

Shared links have the form:
https://server/index.php/s/token
they can be used via webdav by using the token as the username when connecting via the url:
https://server/public.php/webdav

Internal links have the form:
https://server/index.php/f/token
When accessing internal files via webdav, you have to use the url:
https://server/remote.php/dav/files/username/path

Is there a way to translate from an internal link to its webdav path?

I am building an application to send file from a nextcloud dir as attachments to a mailing list. The application should accept internal and shared links. Internal links would be preferred, as the mailing lists contain internal users. The application is like a reminder service.
Currently the application cannot use internal links, as they are useless for webdav access.

Any help appreciated.

I don’t think so - at least not directly - because the shared links versus webdav access links are two different things.

You might like around to see if some alternative approach will work:

https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-share-api.html

I’m a little curious about your use case: What are you using for WebDAV access client? You’re clearly not mounting so are you just using a WebDAV file explorer app? Is the idea that your WebDAV client will open instead of the web interface or even the NC client?