Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Issue when accessing REST API with OAuth2.0 Edited

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 Community Leader Jul 21, 2021

Hi @Dinesh Rajendran 

How are you authorising your request?

Ravi

Yes have been using the latest access_token for every 60 minutes

Ravi Sagar Community Leader Jul 21, 2021

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

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
Community showcase
Published in Jira Service Management

Atlympic Event: Jira Service Managemnt

Hello Community!  Quick disclaimer: We are running a contest on Community (The Atlympics!) from July 23rd - August 8th of 2021. If you are interested in participating in this contest (prizes! ...

98 views 0 1
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you