Skip to content

Instantly share code, notes, and snippets.

@etoews
Created August 17, 2012 16:24
Show Gist options
  • Save etoews/3380355 to your computer and use it in GitHub Desktop.
Save etoews/3380355 to your computer and use it in GitHub Desktop.
Get a token from the Rackspace Open Cloud
$ TOKEN=`curl -s -X POST https://identity.api.rackspacecloud.com/v2.0/tokens -d '{"auth": {"passwordCredentials": {"username":"MY_USERNAME", "password":"MY_PASSWORD"}}}' -H "Content-type: application/json" | python -c 'import json,sys; response=json.loads(sys.stdin.read()); print response["access"]["token"]["id"]'`
$ echo $TOKEN
9d1dc8da-d306-4e39-b9c2-f39a127341f1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment