Forums

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

Issue when accessing REST API with OAuth2.0

Dinesh Rajendran July 21, 2021

I have been trying to get details of a ticket via REST API from Java. Am not sure why am getting this error.

 

How I access the REST API :

https://api.atlassian.com/ex/jira/{cloudid}/rest/servicedeskapi/request/{my-request-id}

Am using the below scope

"scope":"read:servicedesk-request"

 

Response recieved : 

{"code":401,"errorMessage":"Unauthorized"}

 

Getting the same response even when tried via Postman tool

Screenshot.png

Any help is appreciated.


Thanks in advance!

1 answer

0 votes
Ravi Sagar _Sparxsys_
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.
July 21, 2021

Hi @Dinesh Rajendran 

How are you authorising your request?

Ravi

Dinesh Rajendran July 21, 2021

Yes have been using the latest access_token for every 60 minutes

Ravi Sagar _Sparxsys_
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.
July 21, 2021

Try adding X-Atlassian-Token: no-check in the header

Dinesh Rajendran July 22, 2021

All of sudden it started working, but I haven't done any changes.

 

Thanks for your help.

Suggest an answer

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

Atlassian Community Events