Skip to content

What the credential you present is worth

OpenAPI JSON
GET
/v1/me
curl --request GET \
--url https://api.eu.apigami.com/v1/me \
--header 'Authorization: Bearer <token>'

One route for every Apigami credential, because the question is always the same. A user session, a personal token or an agent token answers with the account and its team; an API key with the application it runs; the run token a hosted application is handed answers with the invocation it is serving — which application, which action, which version and whether that version serves production. A page’s token, or a page Apigami hosts calling through /__apigami/v1/me of its own address, answers with the page it opened; a page’s token is refused, with the same 401, from another origin than its page’s. Everything the token was worth when it was minted is re-read: its life, its parents, the team, the authorisation that allowed the call, and, for an invocation with a browser, that the user has not disconnected it. Any of those gone is a 401. There is nothing to send: the answer is derived from the credential, so it can only ever describe that credential. It never returns a browser identifier.

path
string
<= 1024 characters

For a page at its application’s own address, the path the page sits on: the answer then names that page in page_id and page_kind. apigami.js sends it for you.

What the credential is worth. subject says which shape it is.

Media typeapplication/json
One of:
object
subject
required
string
Allowed values: user
user_id
required
string format: uuid
group_id
required
string format: uuid
email
required
string | null
Example
{
"subject": "user"
}

No credential, or one that is no longer worth anything: bad run token, or bad page token for a page’s.

Media typeapplication/json
object
error
required
string
consentPending

Present and true when the approval window is open and the user has not answered within 45 s.

boolean
permission

On consent requested and no grant from emails.send or ai.generate: the permission the user never decided, or refused. Absent for a site.

string
Allowed values: emails ai
settings_url

On no grant: the page of the user’s Apigami space where they allow it again; send them there.

string format: uri
terms

On consent requested, in place of permission: the bare app_id of each application whose terms or subprocessors the user has yet to agree to, unlike the boxes of GET /apps/{app_id}. Only the connect page asks it: send them to connect_url, or to one of your pages.

Array<string>
connect_url

With terms, when the user agrees under your application: your install link, where they tick the boxes still to tick.

string format: uri
Example
{
"error": "bad run token"
}