Rest API. Creating an issue in Jira failing with 401

Jubin M Jacob March 12, 2024

We are using OAuth 2.0 (3LO) app to make API calls to Jira Cloud.

We are using the API to read issues and also to write issues.

Using the token created with the oauth flow, we are able to read the issues but creation of the issues is failing with 401.

This was working before and we started observing this 401 behavior recently.

 

Is there anything changed from Jira SIde?. 

Below is the authorization url used

https://auth.atlassian.com/authorize
?audience=api.atlassian.com
&client_id=PUesxfvPz8GruyEQtXyJr7JigCoBRyAW
&scope=offline_access%20read:jira-work%20write:jira-work
&redirect_uri=https://url/callback
&state=cmVkaXJlY3RVcmw9aHR0cDovL2xvY2FsaG9zdDo0NTAwL3Rlc3RtYW5hZ2VyXy9vYXV0aENhbGxiYWNrLG5vbmNlPTUyZDNiYjU4LWU0OTUtNDRjMi1iMzhmLTJlYjI5ODgyZDE5Myxjb25uZWN0b3JJZD05ZDYwZTRmZC0wYjAwLTAwMDAtMDE1Ni0wYjQ2OGM1NTlmM2YsY29ubmVjdG9yVHlwZT1KaXJhQ2xvdWRPQXV0aCxhY3Rpb249Q3JlYXRlRGVmZWN0LHByb2plY3RJZD0zZmEzMjhlYS0wMTAwLTAwMDAtNTYwZi0wYjQ2NzI0ZTJiYTE
&response_type=code
&prompt=consent

3 answers

0 votes
Einar Pehrson
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 20, 2024

Hi @Jubin M Jacob!

Support for lenient URL path processing for OAuth 2.0 requests is being removed. Roll-out is currently at 50%.

Please see the removal notice and the deprecation notice for more details.

If you are unable to find to troubleshoot your specific case, please submit a Developer Support request.

0 votes
Jubin M Jacob March 12, 2024

This is the error I am getting.
{"code":401,"message":"Unauthorized; scope does not match"}

 

What is the scope required to create an issue?
Jira APP already has write:jira-work permission.

0 votes
David Nickell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 12, 2024

I don;t have much to add other than to say : 

1.  Check the expiration of your token -- especially if you were working before and didn't make any changes.   and

2. don't let a working "GET" call lull you into a sense that you have your token set up correctly.  I've seen REST GET calls work when my token handling was wrong only because I was also logged into JIRA already.

I think  your issue is likely more complex and advanced than I normally run into.

Thanks

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events