Created
August 17, 2012 16:24
-
-
Save etoews/3380355 to your computer and use it in GitHub Desktop.
Get a token from the Rackspace Open Cloud
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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