Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Could anyone help me out on how to add jira authentiaction to my forge-react app

Ajay poly
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 14, 2023

I tried this to get the token :

AP.context.getToken(function(token){
  console.log("JWT token string", token);
});

and tried this to get the user details :

AP.user.getCurrentUser(function(user) {
  console.log("The Atlassian Account ID is", user.atlassianAccountId);
});

but both didn't work


 

1 answer

1 vote
Dugald Morrow
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 14, 2023

Hi @Ajay poly,

It would be better to ask this in the Atlassian Developer Community forum since it is a development question.

In the interest of unblocking you quickly, the APIs you are trying to use are for Atlassian Connect iframes, but since you mention "forge-react app", you are probably looking for Forge CustomUI APIs which are documented here. Specifically, you probably need to call view.getContext() and use the returned accountId.

Regards,

Dugald

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events