Connect to Jira from Forge Web trigger

Hi,

We are trying to connect Jira from Forge Webtrigger function but no luck. Any help would be greatly appreciated.

Scenario-1: Not worked
const result = await api.asApp().requestJira(route/rest/api/3/myself,
{
headers: {
‘Content-Type’: ‘application/json’,
‘Accept’: ‘application/json’
}
});
const data = result.text();

Scenario-2: Not worked
var result = api.asApp().requestJira(route/rest/api/3/myself, {
headers: {
‘Authorization’: ‘Base64’
}
});

Scenario-3: Not worked
const contentForId= await fetch(“https://site-name.atlassian.net/rest/api/3/myself”, {
method: “get”,
headers: {
“Authorization”: “Base64”,
“Content-Type”: “application/json”,
},
});
console.log(contentForId)
console.log(await contentForId.json());

The permissions in the manifest.yml in Scenario-1 and Scenario-2 are:
permissions:
scopes:
- read:jira-user
- read:jira-work
The permissions in the manifest.yml in Scenario-3:
permissions:
external:
fetch:
backend:
- ‘https://site-name.atlassian.net

Thank you,
Bharadwaj Jannu

1 Like