Setting Up an Oauth Token

There is a great how-to for doing this:

This document just shows the actual curl commands required to do everything.

step 1: request

::
curl –dump-header - -H “Content-Type: application/x-www-form-urlencoded” -X POST –data ‘oauth_consumer_key=ci+airline+testing&oauth_signature_method=PLAINTEXT&oauth_signature=%26’ https://launchpad.net/+request-token

This will return something like:

oauth_token=token_value&oauth_token_secret=secret_value

step 2: authorize

Authorization is required via your browser by visiting:

https://launchpad.net/+authorize-token?oauth_token={oauth_token}
eg:
 https://launchpad.net/+authorize-token?oauth_token=token_value

step 3: access token

::
curl –dump-header - -H “Content-Type: application/x-www-form-urlencoded” -X POST –data ‘oauth_signature=%26{oauth_token_secret}&oauth_consumer_key={oauth_key}&oauth_token={oauth_token}&oauth_signature_method=PLAINTEXT’ https://launchpad.net/+access-token

which returns something like:

oauth_token=token&oauth_token_secret=token_secret&lp.context=None

The oauth_token and oath_token_secret returned here plus the oauth_consumer_key will then be required by our API’s to use Launchpad.