Forums

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

always get 401 unauthorized error on Project Search

websitetoon inc
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!
August 18, 2021

Hello Team,

I am very new to this platform, and I need some help.

As I learned from the Project Search API that I need permission to read the project (read:jira-work), Cloud ID, and API token.

I successfully add the scope 

jira-auth-app.PNG

and successfully get API token and Cloud ID, I am trying to fetch all projects using the code below

fetch('https://api.atlassian.com/ex/jira/:cloudId:/rest/api/3/project/search',

{ method: 'GET',

headers: { 'Authorization': `Basic ${Buffer.from( 'email@example.com:<api_token>' ).toString('base64')}`,

'Accept': 'application/json' }

})

However, I am getting an error

{ code: 401, message: 'Unauthorized' }

Could anyone please help me

1 answer

0 votes
Mohamed Adel
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.
August 18, 2021

Hi @websitetoon inc 

May I ask if you are using this API for development or just running normal client query ? 

 

Thanks in Advance

Mohamed Megahed

Suggest an answer

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

Atlassian Community Events