This guide provides step-by-step instructions to authenticate with the CloudPe API using the provided ID and Secret Key.
Required Credentials
Before making the request, ensure you have the following credentials provided by the administrator:
ID: d638abac76884533######### (Sample ID)
Project_id: 997f026XXXXXXXXX83de1ce1e923 (Sample Project ID)
Secret Key: my_super_secret_pass (Sample Key)
To obtain these credentials, contact CloudPe Support.
Checking API Availability
To verify the API is reachable, use the following cURL command:
curl -kv https://in-west3.controlcloud.app:5000/
If the API is accessible, it should return response headers indicating the availability of the Keystone authentication service.
Authentication Request
To authenticate, send a POST request with JSON payload to obtain a valid authentication token. Use the following cURL command:
curl -ksD - -o /dev/null -H 'Content-Type: application/json' -d '
{
"auth": {
"identity": {
"methods": [
"application_credential"
],
"application_credential": {
"id": "d638abac76884533#########", #enter provided ID
"secret": "my_super_secret_pass" #enter provided secret key
}
}
}
}' https://in-west3.controlcloud.app:5000/v3/auth/tokens
Expected Response
If the authentication is successful, the API will return a 201 Created response along with an authentication token in the headers.

However, if authentication fails, you may receive a 401 Unauthorized response.
Troubleshooting
If you receive a 401 Unauthorized error:
- Check Credentials: Ensure that the ID and Secret Key are correct.
- Verify API Endpoint: Ensure you are using the correct authentication URL.
- Confirm API Availability: Run curl -kv https://in-west3.controlcloud.app:5000/ to verify if the API is responsive.
- Check User Permissions: Ensure that the provided credentials have the required permissions to access the API.
Checking Authenticated Session Details
To retrieve details about the authenticated session, including the user’s identity, roles, projects, and service endpoints, you can use the following API request:
curl -X GET "https://in-west3.controlcloud.app:5000/v3/auth/tokens" \
-H "X-Auth-Token: " \
-H "X-Subject-Token: " \
-H "Content-Type: application/json" | jq
Explanation:
X-Auth-Token
: The authentication token obtained from the Identity service.X-Subject-Token
: The same token to fetch details of the authenticated session.jq
: Formats the JSON output for better readability.
This command will return details such as:
- User Identity: The authenticated user’s details.
- Roles: The roles assigned to the user.
- Projects: The projects the user has access to.
- Service Endpoints: The available service endpoints for different OpenStack services.
Conclusion
Once successfully authenticated, you will receive a token that can be used for subsequent API requests. Store the token securely and include it in the X-Auth-Token header for further API interactions.