Forums

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

Get all boards API Encountered a 401 Unauthorized

Adam Brannigan
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!
March 3, 2022

Hi All , 

I have been tyring to get all the boards using an api call from postman. As basic auth is deprecated I have followed the docs showing how to use oauth2 . So far I have been able to authenticate . recived the auth code swaped for auth token & refresh token . I have beed trying to use the auth token to make calls but I am revieing unauthorised .

 

I have checked the sopes and all the ones I need for the call are on . I am unsure what steps to take next can anyone help with this . below is the call as setup in post man.

 

Screenshot 2022-03-03 231115.png

1 answer

0 votes
Neil Mansilla
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 16, 2022

Hi @Adam Brannigan. Welcome to the community. So, I believe the issue here is that the base URL you're using for your OAuth 2 call needs to be formatted differently. You can't call {sitename}.atlassian.net -- it looks more like api.atlassian.com/ex/jira/{cloudId}.

And how, pray tell, should you obtain said {cloudId}? See 3.1 in the docs here: https://developer.atlassian.com/cloud/jira/platform/oauth-2-3lo-apps/#3-1-get-the-cloudid-for-your-site .

Details about constructing a call (as I mentioned in the first paragraph) are in section 3.2 of the docs.

Suggest an answer

Log in or Sign up to answer