API authorization doesn't work on staging

Bug #294657 reported by Jonathan Lange
2
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
High
Leonard Richardson

Bug Description

When trying to follow the instructions on https://help.launchpad.net/API/launchpadlib, I get this error.

>>> launchpad = Launchpad.get_token_and_login('just testing', STAGING_SERVICE_ROOT, cachedir)
The authorization page (https://staging.launchpad.net/+authorize-token?oauth_token=VsHF1WntvMXcn76bcBXl) should be opening in your browser. After you have authorized this program to access Launchpad on your behalf you should come back here and press <Enter> to finish the authentication process.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "launchpadlib/launchpad.py", line 155, in get_token_and_login
    return cls(credentials, service_root, cache, timeout, proxy_info)
  File "launchpadlib/launchpad.py", line 60, in __init__
    self._wadl = self._browser.get_wadl_application(self._root_uri)
  File "launchpadlib/_browser.py", line 229, in get_wadl_application
    url, media_type='application/vd.sun.wadl+xml')
  File "launchpadlib/_browser.py", line 211, in _request
    raise HTTPError(response, content)
launchpadlib.errors.HTTPError: HTTP Error 401: Unauthorized

I asked leonardr about this on IRC, and it seems that this is a known issue: authentication doesn't work with staging.

Jonathan Lange (jml)
Changed in launchpad-foundations:
assignee: nobody → leonardr
importance: Undecided → High
status: New → Triaged
description: updated
Revision history for this message
Jonathan Lange (jml) wrote :

I've updated https://help.launchpad.net/API/launchpadlib to point to this bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.