Skip to content

Instantly share code, notes, and snippets.

@christophchamp
Created November 8, 2013 18:22
Show Gist options
  • Save christophchamp/7375301 to your computer and use it in GitHub Desktop.
Save christophchamp/7375301 to your computer and use it in GitHub Desktop.
Rackspace authenticated token
$ MYRAXTOKEN=`curl -s -XPOST https://identity.api.rackspacecloud.com/v2.0/tokens -d'{"auth":{"RAX-KSKEY:apiKeyCredentials":{"username":"$MYRAXUSERNAME","apiKey":"'$MYRAXAPIKEY'"}}}' -H"Content-type:application/json" | python -c 'import sys,json;data=json.loads(sys.stdin.read());print data["access"]["token"]["id"]'`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment