To authenticate, submit a POST
/v2.0/tokens request, presenting valid
Rackspace customer credentials in the
message body to a Rackspace authentication
endpoint.
GET YOUR CREDENTIALS
You can use either of two sets of credentials:
your
usernameandpasswordyour
usernameandAPI key
Your username and password
are the ones you use to login to the Cloud Control Panel at
http://mycloud.rackspace.com/. Once you are logged
in, you can use the Cloud Control Panel to obtain your
API key.
![]() | Important |
|---|---|
Multiple users (sub-users) can be created for an account but, as explained in Section 4.1.4, “Add User”, users created via the API do not have access to the control panel. Control panel access for these users is coming soon. |
CHOOSE YOUR AUTHENTICATION ENDPOINT
Use the authentication endpoint for the region in which your account is based:
US-based accounts authenticate through https://identity.api.rackspacecloud.com/v2.0/.
UK-based accounts authenticate through https://lon.identity.api.rackspacecloud.com/v2.0/.
SEND YOUR CREDENTIALS TO YOUR AUTHENTICATION ENDPOINT
If you know your credentials and your authentication
endpoint, and you can issue a POST
/v2.0/tokens request in an API call, you have
all the basic information you need to use the Rackspace
Cloud Identity Service.
You can use cURL to try the authentication process in two steps: get a token; send the token to a service.
Get an authentication token by providing your username and either your API key or your password. Here are examples of both approaches:
You can request a token by providing your username and your API key.
curl -X POST https://identity.api.rackspacecloud.com/v2.0/tokens -d '{ "auth":{ "RAX-KSKEY:apiKeyCredentials":{ "username":"theUserName", "apiKey":"00a00000a000a0000000a000a00aaa0a" } } }' -H "Content-type: application/json"You can request a token by providing your username and your password.
curl -X POST https://identity.api.rackspacecloud.com/v2.0/tokens -d '{"auth":{"passwordCredentials":{"username":"theUserName","password":"thePassword"}}}' -H "Content-type: application/json"Successful authentication returns a token which you can use as evidence that your identity has already been authenticated. To use the token, pass it to other services as an
X-Auth-Tokenheader.Authentication also returns a service catalog, listing the endpoints you can use for Cloud services.
Use the authentication token to send a GET to a service you would like to use. Here is an example of passing an authentication token to the Cloud Files service, using the Cloud Files service catalog endpoint that was returned along with the token.
You can use a token and a service endpoint to tell a service that your credentials are valid.
curl -X GET https://storage101.dfw1.clouddrive.com/v1/MossoCloudFS_aaaaaaaa-bbbb-cccc-dddd-eeeeeeee -H 'X-Auth-Token:11111111-aaaa-2222-bbbb-3333cccc4444' --verbose
The rest of this API Developer Guide provides reference and background information, including sample requests and responses. To learn more about the Cloud Identity Service and this API, two good places to begin are with the fundamental ideas explained in Chapter 2, Concepts and the annotated request and response in Section 3.2, “Sample Authentication Request and Response”. To see examples of authentication using several kinds of credentials, read Section 4.3.1, “Authenticate”.
![]() | Tip |
|---|---|
For language binding examples you can adapt to work with the Cloud Identity service, see our Software Development Kits at http://docs.rackspace.com/sdks/guide/content/intro.html. |

![[Important]](/auth-v2.0-auth-client-devguide/common/images/admon/important.png)
![[Tip]](/auth-v2.0-auth-client-devguide/common/images/admon/tip.png)
