I'm doing the same thing as you under the inspiration of Roam Protocol
You can't use the built-in
org-id-goto directly, you have to custom your own org-protocol handler first. Here's the way I do:
'("org-id" :protocol "org-id"
(defun org-id-protocol-goto-org-id (info)
"This handler simply goes to the org heading with given id using emacsclient.
INFO is an alist containing additional information passed by the protocol URL.
It should contain the id key, pointing to the path of the org id.
Example protocol string:
(when-let ((id (plist-get info :id)))
Then, if you open link like
org-protocol://org-id?id=309A0509-81BE-4D51-87F4-D3F61B79EBA4 in a web brower, it will jump directly to the heading with id
309A0509-81BE-4D51-87F4-D3F61B79EBA4 in emacs.
Also, here's a snippet for getting this kind of org-protocol link from current heading:
(defun org-id-protocol-link-copy ()
(org-kill-new (concat "org-protocol://org-id?id="