Connect on forge: Jira AP.request gives 403 while forge bridge is working

I’m currently trying to get our connect plugin working with connect on forge, but all AP requests seems to return a 403 error. As I tried out CustomUi in the past, in my example I’m using customUI next to connect on forge. The same request is working within the customUI part but not for the connect part. At this point I only have company managed projects

Scopes

permissions:
  scopes:
    - 'read:jira-work'
    - 'read:jira-user'

Working CustomUI request

requestJira('/rest/api/3/issue/10000')
.then((response) => {
	return response.json();
}).then((issue: Issue) => {
	setSummary(issue.fields?.summary || 'none');
});

Not working forge on connect request within the connect iframe

AP.request('/rest/api/3/issue/10000')
  .then(data => console.log(data.body))
  .catch(e => console.log(e.err));

I get the following error

Forbidden (403)
Encountered a "403 - Forbidden" error while loading this page.

Versions:
forgeCLI: 2.0.1

Hi @m.herrmann,

Connect auth and Forge work differently and require different scopes. You’ll need to add the Connect scope equivalents to your manfest, e.g. read:connect-jira or write:connect-jira - see this section of the connect-on-forge tutorial for more.

2 Likes

Thanks, I missed that part

1 Like