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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.