GET
/dashboard/account Get account details
Returns the authenticated user's account information, 2FA status, API keys, and passkeys.
Response
200
401
twofa_statusbooleanWhether 2FA is enabled
userobjectidintegerfirst_namestringlast_namestringemailstringbilling_emailstringnullableabuse_emailstringnullablephonestringnullablestatusstringcreditnumberemail_verifiedbooleanemail_subscribedbooleantwoFactorAuthenticationbooleanlastActivitystringcreated_atstringupdated_atstringshow_cancelled_itemsbooleanapikeysarraypasskeysarrayRequest
curl -X GET "https://api.royalehosting.net/dashboard/account" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-organization-id: YOUR_ORG_ID"Request
const response = await fetch("https://api.royalehosting.net/dashboard/account", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"x-organization-id": "YOUR_ORG_ID",
},
});
const data = await response.json();Request
import requests
response = requests.get(
"https://api.royalehosting.net/dashboard/account",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"x-organization-id": "YOUR_ORG_ID",
}
)
print(response.json())Response
{
"twofa_status": true,
"user": {
"id": 123,
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"billing_email": "string",
"abuse_email": "string",
"phone": "+31612345678",
"status": "active",
"credit": 50,
"email_verified": true,
"email_subscribed": true,
"twoFactorAuthentication": true,
"lastActivity": "2024-01-15T10:30:00Z",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"show_cancelled_items": false
},
"apikeys": [
{
"id": 1,
"name": "My API Key",
"key": "a1b2c3d4...",
"billing": true,
"shield": true,
"vps": false,
"created_at": "2024-01-15T10:30:00Z",
"lastUsed": "2024-01-15T10:30:00Z"
}
],
"passkeys": [
{
"id": 1,
"name": "iPhone 15",
"icon_dark": "string",
"icon_light": "string",
"synced": true,
"created_at": "2024-01-15T10:30:00Z",
"last_used": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
]
}