Forums

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

facing issue to GET PRIVATE REPOSITORY using api curl

Pankaj Kumar Malviya November 5, 2025

Hi Team,

Api_token I have created with read and write scope.

I am trying to access private repository using api curl but it is throwing error.

First try using Bearer Auth

--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {api_token}'

Error
{
"type": "error",
"error": {
"message": "Token is invalid, expired, or not supported for this endpoint."
}
}


Second Approach  (this is working for public repo but not working for private repo)

--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: {api_token}'


Error
{
"type": "error",
"error": {
"message": "You may not have access to this repository or it no longer exists in this workspace. If you think this repository exists and you have access, make sure you are authenticated."
}
}

Please suggest what is the missing parameter to GET PRIVATE REPOSITORY



0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events