Ah, of course; I need to get more sleep.
I have a few shared notes and I now remember doing that. In my case, however, to check the share status first, I've clicked the Share icon, selected Manage Shared Note, and when the Share dialog opened selected the Copy Link button.
With all that said, the method I shared above creates a URL scheme link versus a Share link. See:
Defining a custom URL scheme for your app | Apple Developer Documentation
URL scheme links:
-
Are not limited to shared notes.
-
If the note is On My Mac, the link will only be useful on the mac.
-
If the note is in iCloud, the link will be useful on any device logged into the same iCloud account.
@ComplexPoint, please excuse my ignorance, but is there any chance that you could extract these with a modified version of Copy as Markdown link?