Skip to content
Suomi

The principal the token acts as

GET
/v1/me
Code sample: Shell / cURL
curl --request GET \
--url https://api.whatsbuilt.fi/v1/me \
--header 'Authorization: Bearer <token>'

Any valid token may call it, whatever its scopes. Use it to check a new token.

The principal

Media typeapplication/json

Who the token acts as.

object
principal
required

integration for an integration’s token; person for an app acting for a person

object
kind
required

integration or person.

string
Allowed values: integration person
id
required

The principal’s users.id.

string
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/
name
required

The principal’s own name.

string
integration

For an integration’s token

object
client_id
required

The integration’s id.

string format: uuid
name
required

The integration’s name.

string
app

For an app acting for a person: the registered app and the person’s connection to it

object
client_id
required

The app’s client id.

string format: uuid
name
required

The app’s name.

string
connection_id
required

The person’s connection to the app.

string format: uuid
organisation
required

The principal’s organisation.

object
id
required

The account’s id.

string format: uuid
name
required

The account’s name.

string
scopes
required

The token’s scopes the principal still holds: an integration’s current scopes, an app’s within its organisation’s cap

Array<string>

Example

{
"principal": {
"kind": "integration"
}
}

Missing, malformed, expired or revoked token

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

INSUFFICIENT_SCOPE, or PUBLIC_API_DISABLED when an admin of the integration’s organisation, or on a per-project route of the project’s owning organisation, has turned the API off

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

The principal no longer exists

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

RATE_LIMITED; wait for Retry-After seconds

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}