Get Obsidian URL action

When I type this url to browser (obsidian://clickup?code=testingxcode) and open Obsidian with it, in Obsidian devtools console logs this: Received URL action: {action: ‘clickup’, code: ‘testingxcode’; but, how can i get this data in my custom Obsidian plugin? This log comes from app.js.

Check the docs for registerObsidianProtocolHandler here:

Here is an example I use in one of my plugins:

 async onload() {
  // ...
  this.registerObsidianProtocolHandler("playground", async (e) => {
    const parameters = e as unknown as Parameters;
    const f =!);
    if (f instanceof TFile) {
      this.settings.template = f;
      await this.saveSettings();
      await this.activateView();

  // ...

Here is an example URL that activates this handler:



Thanks a lot! It works!