Runtimes
Web triggers
Async functions
Product REST APIs
Fetch APIs

Generating a webtrigger URL via SDK

The web trigger runtime API can be used to obtain web trigger URLs within your app programmatically.

See the web trigger module for more details.

Import the Forge API package in your app as follows:

1
2
import { webTrigger } from "@forge/api";

webTrigger.getUrl

Obtain the URL for the web trigger module specified by the given module key.

1
2
await webTrigger.getUrl("example-web-trigger-key");

The web trigger URL is stable for each combination of:

  • module key
  • app
  • site
  • product
  • Forge environment

For example, redeploying a new version of your app to the Forge production environment does not change the web trigger URL. However, the web trigger URL for the same app in the development environment is different.

Method signature

1
2
webTrigger.getUrl(moduleKey: string): Promise<string>;

Rate this page: