How to get the URL of a Forge app in Jira?

I have a forge app that’s being loaded as jira:projectPage. Its name and link show up in the nav bar in Jira. How can I programatically produce the URL to take a user to the page with my app selected? E.g<id 1>/<id 2>

I’m redirecting the user to a new page to do something - and would like to redirect them back to Jira with my app selected, to pick up where they left off.


Hi @aliakhtar

If your app is a Custom UI app, you might be able to leverage the createHistory method to allow to redirect to where your user was.

See the documentation here:

As noted, the jira:projectPage is one of the supported modules.

Hope this helps.

Thanks @XavierCaron but I actually need to open a popup window via (a workaround to get microphone access) - so users will be on a site outside of Jira where I’ll get their voice command via microphone. Then I need to redirect them back to Jira.

So I can’t use the createHistory bridge as they will be on an external site outside of Jira. I need an independent way to generate the URL that’ll take them back to Jira with my app selected. How can I do that?

I’m also interested in this. My use case is that I’m using Custom UI for a Jira project page, and I want to generate a URL which the user can share as a link, but I couldn’t see anything in the docs about how to do this.

The createHistory bridge only provides relative paths, and the window.location object appears to maintain a reference to a CDN (e.g. so I need to figure out the actual Jira app root (i.e. the url of the project page).

I did notice how I can potentially piece together the URL, but it’s based on a few assumptions:

  1. Suppose my project page is at
  2. Suppose also that I navigate to /my-page?foo=bar using react-router in my custom UI. (The full URL would then be
  3. Then the result of view.getContext() (from the @forge/bridge package) looks like the below.
  extension: {
    project: {key: "MYPROJ", type: "software", id: "10000"}
  type: "jira:projectPage",
  localId: "ari:cloud:ecosystem::extension/app-id/other-id/static/my-app"
  1. Therefore, I can get the project key from context.extension.project.key, and I can parse context.localId to get the application id and the “other id”. (Anyone know what this second ID is called or is for btw?)
  2. I can get the baseUrl ( from the /rest/api/3/serverInfo URL.
  3. This allows me to piece together the full URL of the app, assuming a template of {baseUrl}/jira/software/projects/{projectKey}/{appId}/{otherId}.
  4. I can then simply append the relative URL of my custom UI page (/my-page?foo=bar) to this URL for the app in order to get the link to share.

So this looks like it should work. However, I have a couple of questions:

  1. Is this approach guaranteed to work in future, or am I making assumptions about the format of the localId and the URL scheme?
  2. Is there a better way to get the app URL? (Certainly, this seems a lot of work.)

Hi @XavierCaron,

Any update on this topic? I also have the need for a static Forge app URL (ProjectPage) that I can share with others and/or open in another tab.

Thank you,

Hi @jbrunton & @PauloMichels

Thanks for reaching out. I have confirmed with my team that unfortunately there is no easy way to derive this value today.

It has been put on our radar and it is now tracked internally.

1 Like