Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-17614

Get ssh-keys for the user REST API version 2 with oauth

    XMLWordPrintable

Details

    Description

      Hi Guys,

      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?

      Also, it seems to work for REST API v1

      Attachments

        Activity

          People

            Unassigned Unassigned
            ec55cd55dfe6 Vitalii Galkin
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: