Issue Search returns 401 if any query is set

I can successfully retrieve all issues through my Atlassian Connect App by sending a GET request to:

.../rest/api/3/search

however, all the following requests fail with status code 401:

.../rest/api/3/search?startAt=0&maxResults=50
.../rest/api/3/search?fields=description
.../rest/api/3/search?jql=project%3Dtest

I’ve already tried with only the READ scope as well as the ADMIN scope. Why do any of these queries fail?

You’re queries look fine. But the 401 response suggests you’re unauthorized. Are you sure you’re passing credentials properly? If you are viewing one of the matching issues in jira can you change the url of the browser to the path you mention and display it (the browser will handle passing the login data for you in this case).

Thanks for your response. I am passing the credentials in the exact same way for all requests; Unless the first request does not require any credentials, it should be the correct way.

I can, however, access the result through the browser like you suggested, which makes it seem like it’s a credential issue after all. I will have a closer look at the authentication.

Thank you, sir. I had not included the query parameters into the hash that’s embedded in the JWT. Problem solved - have a cup of coffee on me!

1 Like