How do I create an issue via oAuth 2.0 access token?

demp_project_test
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!
January 8, 2022

Good afternoon!
Please help me to understand API version 3
I use OAuth 2.0 (I have access_token and refresh_token)

 

I want to create an issue (cloud jira)
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post
But i dont understand how to use access_token, in documentation there are examples only with basic(email+api token)


1) Can I use oAuth 2.0 access tokens at all or this possibility doesn't exist and only basic authorization can be used?
2) If possible, can you write an example link where i should send a post request ?


thanks

 

 

 

 

 

I try to do it:

 

const bodyData = {
fields: {
project: {
key: "TEAM",
},
summary: "Main order flow broke11n",
description: "efef",
issuetype: "Task",
},
};

return axios.post(`https://api.atlassian.com/ex/jira/{Here I enter the cloud id}/rest/api/3/issue`, bodyData, {
headers: {
Authorization: `Bearer ${accessToken}`,
Accept: "application/json",
},
});
}

 

 

I get error 400 as a result

1 answer

0 votes
Sean Young December 18, 2023

Also a bit confused on this.  I create an oauth cred with client id and secret.  It only lets me grant build, development, etc permissions.

Suggest an answer

Log in or Sign up to answer