Forums

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

Has there been a recent change to the REST API authentication scheme?

gbartnik
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!
May 14, 2020

Hello everyone,

 

I had authored a script some time ago which exercised the BitBucket REST API to extract data concerning the number of associated projects for a given workspace and their associated issues.

 

The first step to this process to issue the following, where [WORKSPACE], [USER] and [PASS] where all populated a valid:

curl -I https://api.bitbucket.org/2.0/repositories/[WORKSPACE]? -u [USER]:[PASS]

This appeared to work until yesterday. Now I observed a '401 Unauthorized' response. The credentials have been checked and are still valid.

 

Has Atlassian made any changes which would prevent the credential-based authorization? Is OAuth now required?

 

Thanks,

 

Grant

1 answer

0 votes
alexb75 May 15, 2020

For me it appears to work:

$ curl https://api.bitbucket.org/2.0/repositories/alexb75 -u alexb75:<appKey>
{"pagelen": 10, "size": 12, "values": [{"scm": "git", "website": "", "has_wiki": false, 

....}

 

Are you using your password or a generated appKey (as i do)?

gbartnik
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!
May 26, 2020

This did not work for me.

 

Oddly enough, I have determined that I must log in using a web browser first in order to authenticate. Note that even in this case, using the generated appKey does not work. Is this expected? 

alexb75 May 26, 2020

Are you supplying other headers as well, like oauth tokens?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events