Get account profile
Read your account profile
Note for users in mainland China: Please use https://api.toapis.cn as the API endpoint (Base URL). Replace https://api.toapis.com with https://api.toapis.cn in the examples in this document.
See Access for authentication, pagination, and errors.
Behavior
Returns the current account's basic profile, useful for confirming which account the token belongs to. The response contains only six fields: id, display_name, created_at, region, locale, and account_type.
account_type is normal (main account) or sub (sub-account). Unverifiable historical time, region, or locale values return null. No email, username, or credentials are returned.
Authentication
AuthorizationstringheaderrequiredUse Bearer YOUR_SYSTEM_ACCESS_TOKEN. Model API keys are not accepted. X-User-Id is not required.
Request parameters
This endpoint accepts no path or query parameters and requires no request body.
Request examples
requestExample
curl --request GET \
--url 'https://api.toapis.com/api/v1/account' \
--header 'Authorization: Bearer YOUR_SYSTEM_ACCESS_TOKEN'import requests
response = requests.get(
"https://api.toapis.com/api/v1/account",
headers={"Authorization": "Bearer YOUR_SYSTEM_ACCESS_TOKEN"},
timeout=30,
)
response.raise_for_status()
print(response.json())const url = new URL("https://api.toapis.com/api/v1/account");
const response = await fetch(url, {
headers: { Authorization: "Bearer YOUR_SYSTEM_ACCESS_TOKEN" },
signal: AbortSignal.timeout(30_000),
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}: ${await response.text()}`);
}
console.log(await response.json());Response fields
Examples use fictional data and assume credits_per_usd="100". Use the conversion rate returned by the API.
codeintegerNumeric result code; 0 means success.
messagestringResponse message; empty on success. Error messages are localized.
dataobjectResult object for this query.
data.idstringID of the authenticated account. Returned as a decimal ID string.
data.display_namestringAccount display name.
data.created_atstring | nullCreation time. RFC 3339 timestamp with a timezone. null when unknown or inapplicable.
data.regionstring | nullAccount region; null when unknown in historical data.
data.localestring | nullAccount language preference, not necessarily the language negotiated for this response. null when unknown or inapplicable.
data.account_typestringAccount type: normal for a main account, sub for a subaccount.
Response examples
responseExample
{
"code": 0,
"message": "",
"data": {
"id": "7",
"display_name": "Example User",
"created_at": "2026-10-01T00:00:00Z",
"region": "global",
"locale": "zh",
"account_type": "normal"
}
}