Atlassian Forge: Need to request a jira API asApp from custom UI front end

Hi,

I have a connect app which I am migrating to forge. I am using custom UI for my front-end. There are a few API calls I need to make to Jira(specifically to get/set forge app properties). These need to be invoked asApp, but I am not able to find anything in forge/bridge to allow this. There is a method in forge/api but it is for the backend resolver, and not for the front-end. Am I missing something. or is there no way to requestJira asApp from front-end?

Hi @KaustubhAgarwal

as far as I know, you are right. You can’t call Jira APIs asApp directly from Custom UI in Forge, as front-end code (via @forge/bridge) runs as the user for security reasons. Instead, the typical approach (for us) is to use the back-end resolver with @forge/api to handle asApp calls (e.g., for app properties). Your front-end can invoke the resolver using @forge/bridge’s invoke function.

Also it is fine to be aware of this: https://developer.atlassian.com/platform/forge/runtime-reference/authorize-api/ - so there is no auth bypassing.

Thanks Martin.