Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to get ssh-keys for the user REST API version 2

Vitalii Galkin November 22, 2018

Hi Everyone,

I'm trying to fetch public ssh-keys from the user account (from bitbucket site). I'm using oauth2 for authentication and provide request with access token in the headers.

But I'm getting a 403 error with a message

'{"type": "error", "error": {"message": "This API is only accessible with the following authentication types: session, password, apppassword"}}'

I'm using url from this documentation page

https://developer.atlassian.com/bitbucket/api/2/reference/resource/users/%7Busername%7D/ssh-keys#get

I don't see there any mentions about some specific authentication limitations

I have tried requests to hooks and repositories endpoints for same user with the same access token all successful.

And I have account read scope for my oauth consumer

It looks like I cannot use oauth to fetch user's ssh-keys. What should I use then? How to fetch ssh-keys for the user via REST API 2?

2 answers

0 votes
Andy Dysart May 16, 2019

Same problem here as well.  It would be very useful if an access-token associated with a team administrative account would be allowed to view and modify the ssh keys of a users in that team.

0 votes
mfb2 April 12, 2019

I am encountering the exact same error - can we get some visibility to this given the pending GDPR updates?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events