API DocumentationAccount
Get account profile
Returns the authenticated account's identity fields (name, email, picture, ...) as well as other details like trial status. Requires an initialized account.
Authorization
bearer_auth AuthorizationBearer <token>
Authentication
Create an API token on Profile, or with osctl auth login. Send it in the Authorization header:
Authorization: Bearer os1_...Do not use the Keycloak web-session JWT as an API token. Keep the secret secure and do not share it.
In: header
Response Body
application/json
application/json
text/pain
application/json
application/json
curl -X GET "https://example.com/v1/account/profile"{ "id": "0192f0a1-2b3c-7d8e-9f01-23456789abcd", "username": "jane.doe", "email": "jane@example.com", "first_name": "Jane", "last_name": "Doe", "picture": "https://lh3.googleusercontent.com/a/example", "trial": { "level": 1, "is_trial_exempt": false, "voucher": { "redeemed_at": "2024-04-15T14:54:31.486Z", "redeem_by": "2024-04-25T14:54:31.486Z", "duration_days": 30, "trial_expires_at": "2024-05-15T14:54:31.486Z", "days_remaining": 12, "trial_expired": false } }}{ "errors": [ { "message": "'vcpus' field must be an integer", "field": "resource_id" } ]}"Access denied"{ "errors": [ { "message": "User not initialized. Send POST /v1/init, then retry the request." } ]}{ "errors": [ { "message": "VM with ID 23 not found" } ]}