Last updated Apr 25, 2024

Calling a remote backend from a Forge frontend

You can call your remote backend from your frontend (Custom UI and UI Kit) via a resolver. The diagram below illustrates the data flow.

Forge Remote diagram describing the flow of data and auth between Forge and remote application

Getting started

To define a remote endpoint for a Forge module, in your manifest.yml:

  1. Specify the endpoint your app will send remote requests to. For UI modules, this is done using the resolver.endpoint property of the module that will be making remote requests.
  2. Define an endpoint item with a key matching the endpoint name you specified in the previous step.
    1. Set the remote property to the key that uniquely identifies the remote system the endpoint will communicate with.
    2. If you want Forge to provide system or user tokens, request them in the auth property.
  3. Define a remotes item with a key matching the remote name you specified in the endpoint, setting the baseUrl to the site URL prefix to prepend to the routes specified in your invokeRemote request.

Example manifest

Here's an example of how to setup your manifest:

    - key: forge-remote-app-node
      resource: main
        endpoint: remote-macro-node
      title: forge-remote-app-node
      description: Invokes a Forge Remote NodeJS Server and renders the result.
    - key: remote-macro-node
      remote: remote-app-node
          enabled: true
          enabled: true 
  - key: main
    path: static/hello-remote-world/build
    - read:app-system-token
    - read:app-user-token
  - key: remote-app-node

Verifying requests

You will need to verify the requests received by your remote came from Atlassian and are intended for your app. For more information on how to do this, see Verifying remote requests.

Product modules

To see a complete list of modules you can use to call your remote, including payload and context properties, see the Forge modules for each product:

Next steps

Now that you’ve verified the requests and have received your access tokens, you can:

Rate this page: