Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,367,208
Community Members
 
Community Events
168
Community Groups

api rest autorisation issue

Hello,
I come to you for help, when I try to make calls with the jira rest api, in response it tells me that I do not have the rights to see it or that the ticket does not exist


{
errorMessages: [ "Le ticket n'existe pas ou vous n'êtes pas autorisé à la voir." ],
errors: {}

1 comment

Can you provide an example of the API and let us know if you are making the call to Jira Cloud or Server/DC?

Like Mohammed Chaudhry likes this

hello, how can we know if we are making call to jira cloud ou server please ?

Jira Server/DC API documentation
https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/

Jira Cloud API documentation:
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-priorities/

Note that for authentication on Cloud, you will need to use the Basic authentication scheme. Whereas for Server/DC you will need Bearer scheme.
Server/DC:
https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html

Cloud:
https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/

Also, check if you can access the ticket. Make sure that for this particular project, you actually have the required permission. Best is to check the permission scheme and cross-check with your user role, and to also just paste the url of the API into Firefox to test the output.

Like Mohammed Chaudhry likes this

with regard to which one you are connecting to. I would just login to the URI and the confirmation will be there for you.

Like Mohammed Chaudhry likes this

hello christopher,
i am using jira cloud, and doing the project in node.js with package jira.js
 the code :
const jira = new Version2Client({
host:"https://project.atlassian.net",
newErrorHandling: true,
authentication : {
basic : {
email : 'chaudhry@domaine.com' ,
// password : 'toto'
apiToken : 'IEbzO2aSxUUZzIiOmOMfC9BF' ,
},
},
});

 

const projects = await jira.projects.getProject({projectIdOrKey : "WS"}, function(callback) {
console.log(callback);
});
console.log(projects);

i am realy in big difficulte i dont understand, they return me one "NULL"

Comment

Log in or Sign up to comment
TAGS

Atlassian Community Events