Internal links and webdav

Shared links have the form:
they can be used via webdav by using the token as the username when connecting via the url:

Internal links have the form:
When accessing internal files via webdav, you have to use the url:

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:

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?