Developer
On this page

Browser API

Open a URL in the user's default system browser.

The ctx.sdk.browser surface opens a URL in the user’s default system browser.

Scope required: browser:open

Usage

Call ctx.sdk.browser.open inside a method’s run body:

import { defineMethod } from "@rightplace/applet-sdk/v2";

export default defineMethod({
  async run(_params, ctx) {
    await ctx.sdk.browser.open("https://docs.rightplace.app");
  },
});

The single argument is the URL string to open.

Notes

  • Declare browser:open in applet.json::scopes[] or the call is denied.
  • The URL opens in the user’s default system browser (Safari, Chrome, Firefox), not in RightPlace’s built-in browser.
  • Use this for external links, OAuth handoff, and documentation references.
  • Returns a Promise; await it before the method returns.