← Back to team overview

launchpad-dev team mailing list archive

Re: Problem using Launchpad API to retrieve the authenticated user

 

The body says "Unknown access token (wTp5QZc8v8NFV4S7hhnx)" when I send
this request

Authorization = "OAuth realm=\"https://api.staging.launchpad.net/\
",oauth_consumer_key=\"Notgary-Orbiter-iPhone-UnderDevelopment\",oauth_token=\"wTp5QZc8v8NFV4S7hhnx\",oauth_signature_method=\"PLAINTEXT\",oauth_signature=\"%26rvgcgs2ktfrRfGmpQqPzq9GPxBCkWkQzmrN7dTHSff00jgJn8rtlGRwbLvk38fldMkDfXX0lGJlppn1h\",oauth_timestamp=\"1363247774\",oauth_nonce=\"80cCcpPKGrmvaD5Ynra9LtGcpzwRtphK\",oauth_version=\"1.0\"";

Again, OAuth credentials have since been revoked.


On 14 March 2013 01:34, William Grant <william.grant@xxxxxxxxxxxxx> wrote:

> On 14/03/13 11:09, Chris Wilson wrote:
> > There's a fair amount of code already in place, but only a part of it is
> > involved in the OAuth workflow. The place where the request is being
> > signed, and the place where I've been focusing most of my own debugging
> > efforts, has been this file
> >
> >
> https://github.com/notgary/ObjectiveC-LaunchpadLib/blob/master/ObjectiveC-LaunchpadLib/Launchpad.m
> >
> > In here, on line 97, is a function called signRequest, which takes a
> > pointer to a request object and inserts the Authorization header.
> >
> > The request is originally created in this file
> >
> >
> https://github.com/notgary/ObjectiveC-LaunchpadLib/blob/master/ObjectiveC-LaunchpadLib/LaunchpadFactory.m
> >
> > in the function called downloadJsonFromLaunchpad, where an unsigned GET
> > request is set up after being passed the url to which it should be sent,
> > in this case that's https://api.staging.launchpad.net/people/+me which
> > is being passed in from the function called manufactureAuthenticatedUser
> > on line 37 of this file
> >
> >
> https://github.com/notgary/ObjectiveC-LaunchpadLib/blob/master/ObjectiveC-LaunchpadLib/Factories/PersonFactory.m
> >
> > and that's where it all begins.
>
> It all looks reasonable enough :(
>
> What's the body of the 401 response? It should give some indication of
> the problem, given that your request seems well-formed.
>
> Also, although it won't be causing this authorisation issue, you're
> missing an API version from the request URL. You'll want something like
> https://api.staging.launchpad.net/devel/people/+me, for the devel API
> version.
>
>

Follow ups

References