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.
| field | type | what it is |
|---|---|---|
id | string | A 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 absent | string | undefined | |
avatar may be absent | string | undefined | |
banner may be absent | string | undefined | |
bio may be absent | string | undefined | |
verified may be absent | boolean | undefined | |
created_at may be absent | string | undefined | |
email may be absent | string | undefined | |
email_verified may be absent | boolean | 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.