Get the connected account
Returns which KLCT account the token belongs to and whether billing is active. Call this first after connecting to confirm you hold the right account.
Response fields
| Field | Description |
|---|---|
account_idinteger |
The KLCT account id. |
namestring |
Account name. |
billing_activeboolean |
False when the account has no active plan yet. |
setup_urlstring |
Where a person can finish setup when billing is not active, otherwise null. |
Errors
- 401Missing, invalid or expired token.
- 403The token does not carry the "identity" scope (error: insufficient_scope).
- 429Rate limit reached. Retry after the Retry-After header.
curl "https://app.klctai.com/api/platform/account" \
-H "Authorization: Bearer $KLCT_API_KEY"
const res = await fetch("https://app.klctai.com/api/platform/account", {
headers: { Authorization: `Bearer ${process.env.KLCT_API_KEY}` },
});
const data = await res.json();
import os, requests
res = requests.get(
"https://app.klctai.com/api/platform/account",
headers={"Authorization": f"Bearer {os.environ['KLCT_API_KEY']}"},
)
data = res.json()
$client = new GuzzleHttp\Client();
$res = $client->request('GET', 'https://app.klctai.com/api/platform/account', [
'headers' => ['Authorization' => 'Bearer '.getenv('KLCT_API_KEY')],
]);
$data = json_decode($res->getBody(), true);
{
"account_id": 4821,
"name": "Acme Dental",
"billing_active": true,
"setup_url": null
}
{
"message": "Unauthenticated."
}
{
"error": "insufficient_scope",
"error_description": "This token does not have the \"identity\" scope."
}
{
"message": "Too Many Attempts."
}