acyka api

GET /api/v1/me

getMe

needs profile

It exists beside userinfo rather than instead of it because userinfo's shape is fixed by the spec and this one is ours to grow.

curl https://api.acyka.cc/api/v1/me \
  -H "Authorization: Bearer $ACYKA_TOKEN"

Asking #

Nothing. The address is the whole of the question.

Answering #

200 Me

The shapes #

Me #

An account, as its own token sees it.

Field for field what `/oauth2/userinfo` would say, in this door's casing, plus the things a claim set has no room for. It exists beside userinfo rather than instead of it because userinfo's shape is fixed by a spec and this one is ours to grow.

fieldtypewhat it is
id stringA string, and never a number. It is an `id_token`'s `sub` on the other door and a JSON number loses precision in a language that has only doubles — which is most of them, including the one most of these clients are written in.
nickname may be absentstring | undefined
avatar may be absentstring | undefined
banner may be absentstring | undefined
bio may be absentstring | undefined
verified may be absentboolean | undefined
created_at may be absentstring | undefined
email may be absentstring | undefined
email_verified may be absentboolean | undefined

When it says no #

A refusal is { "message": "errors.something" } — a phrase name and never a sentence, because one screen can be read in five languages. Every library turns the name into a type, so you catch the class you can do something about. Errors has the list.