Got 401 response when retrieving user teams

Issue #11162 resolved
created an issue

I has developed my CI service via Bitbucket APIs and blocked by one API "", I always got 401 response. I tested other API such as "<team_name>;" and got expected result. The API worked fine few days ago but is blocking now.

I use python module 'rauth 0.7.1'. The test code is very simple.

from rauth import OAuth1Service

# Create a new consumer at{username}/api
CONSUMER_KEY = '<customer key>'
CONSUMER_SECRET = '<customer secret>'

# API URLs from
REQUEST_TOKEN_URL = '!api/1.0/oauth/request_token'
ACCESS_TOKEN_URL = '!api/1.0/oauth/access_token'
AUTHORIZE_URL = '!api/1.0/oauth/authenticate'

def get_service():
    # Create the service
    return OAuth1Service(name='bitbucket',

def get_session():
    access_token = '<access token>'
    access_token_secret = '<access token secret>'
    return get_service().get_session(token=(access_token, access_token_secret))

session = get_session()
url = '<team_name>' # work FINE
url = '' # NOT work
resp = session.get(url)
print 'status={}, content={}'.format(resp.status_code, resp.text)

Comments (3)

  1. Log in to comment