Skip to content
Developers
Open app

Get account

GET
/v1/account
const url = 'https://api.focal.inc/v1/account';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}

Returns the organization the token belongs to, its scopes, and a small token descriptor. Useful as a connectivity smoke test for new integrations.

Rate-limit cost: 1.

OK

Media typeapplication/json
object
data
required
object
organization
required
object
id
required
string format: uuid
name
required
string
scopes
required
Array<string>
spaces
required
Any of:
object
type
required
string
Allowed values: all
token
required
object
id
required
string format: uuid
name
required
string
suffix
required
string

Example

{
"data": {
"organization": {
"id": "b46d9033-24b2-4441-87ad-2151088fde01",
"name": "Alder & Pine"
},
"scopes": [
"media:read",
"boards:write"
],
"spaces": {
"type": "all"
},
"token": {
"id": "a4a43e28-06c6-4174-bdcb-2b999fb27bb7",
"name": "Looker sync",
"suffix": "qkLs"
}
}
}

Missing, invalid, or disabled token. error.code is unauthenticated.

Media typeapplication/json

Canonical error envelope. code is stable across releases and intended for programmatic handling; message is human-readable. details only appears for validation failures and lists the offending fields.

object
error
required
object
code
required
string
Allowed values: unauthenticated forbidden not_found bad_request conflict rate_limited internal_error
message
required
string
details
Array<object>
object
field
string
issue
required
string

Example

{
"error": {
"code": "unauthenticated",
"message": "Bearer token is missing or invalid"
}
}

Rate limit exceeded. error.code is rate_limited. Wait the number of seconds in the Retry-After header before retrying. Quotas are per-token; see the “Rate limiting” section at the top of this document.

Media typeapplication/json

Canonical error envelope. code is stable across releases and intended for programmatic handling; message is human-readable. details only appears for validation failures and lists the offending fields.

object
error
required
object
code
required
string
Allowed values: unauthenticated forbidden not_found bad_request conflict rate_limited internal_error
message
required
string
details
Array<object>
object
field
string
issue
required
string

Example

{
"error": {
"code": "rate_limited",
"message": "Rate limit of 1000 units per 60s exceeded (this request cost 5)"
}
}
Retry-After
integer
Example
12

Seconds to wait before retrying.