Sign in with Elixir
Elixir's family apps sign you in with your Elixir account, and create one if you are new: no consent page, and one grant you can see and end in Settings. Other apps can ask too, for less, and you approve each one.
Elixir is the account for the whole family. A family app has no sign-up of its own: it sends you to Elixir, you sign in or create your account there, and it knows who you are and which players are yours. Under the hood it is OAuth 2.1, the same sign-in an MCP client uses to connect. Clan needs none of this: it is part of Elixir and uses your Elixir session directly.
The apps that use it
| App | Where | Asks for |
|---|---|---|
| Elixir Drop | drop.poapkings.com | cr:read and account:email |
Drop is a family app: a client Elixir provisioned itself, with a
secret it sends at /oauth/token (client_secret_post), and every return
address on a family origin. A family app calls
GET /api/v1/me as you without an hourly limit, and only a
family app can be given account:email, and only when
it asks. Drop learns who you are, and the players you follow, from
GET /api/v1/me, along with your profile image, and your address from
/oauth/userinfo. It writes
nothing to Elixir.
What you see
A family app (Elixir Drop). Signed in at elixir.poapkings.com already, you see no page at all: Elixir sends you straight back to the app, signed in. There is no consent page, because a family app is Elixir's own and gets only what it asked for, never more. Not signed in, the page reads Sign in to and the app's name: enter your email, then the six-digit code it sends (15 minutes, five tries), and press Sign in. The page says the app is one of Elixir's own, names the address it sends you back to, and lists what the app will be able to do, with no boxes to tick. Signing in that way signs the browser in to Elixir too.
New to Elixir? The same page creates your account. Enter your email and the code, and your free Elixir account opens once the code is proved, never before, exactly as signing up on the website does: an ordinary member account, with the Send me Elixir product news box checked unless you untick it, and the welcome email. Tick I am 13 or older to open one: Elixir accounts are for people 13 or older, and without the tick the code signs in only an account that already exists. The page asks for no player tag; add yours in Settings › Players & following. An address whose account was denied or disabled does not reopen here either.
Any other app. Signed in already, the page reads Connect and the
app's name, says which address you are signed in as, and has one
Authorize button, with a link to sign in with a code instead when
the browser is not yours. Not signed in, it is the same email and code,
and the code page carries the consent. The page says the app "named
itself; Elixir has not checked it", and asks you to continue only if you
started the connection and trust the address the code goes to. Then
come the capabilities the app asked for; other ordinary capabilities are
offered as boxes, unticked. account:email is never
offered unasked, and only a family app may ask for it.
switch=1 on the authorize address always shows the email step, for a
shared browser signed in as somebody else.
Ending a grant
Settings › Connections & agents lists every app connected to your account; Disconnect ends one at once, and its capabilities can be narrowed there. A grant lasts 90 days at most; within it, the app holds an access token for an hour at a time and renews it with a refresh token that changes on every use. A refresh token used twice ends the whole grant.
For developers
Any app can register and ask a person for a grant, with no key from anyone: registration is open (dynamic client registration), the client is public, and PKCE with S256 is required. A registration is refused when its name begins with Elixir's or POAP KINGS' name, or when a return address is on a family origin. What an outside app can get:
- a grant for Sign in with Elixir (
resourcehttps://elixir.poapkings.com/api/v1) or for the person's MCP door (/mcp), never both on one token: a token for one door is refused at the other; - the ordinary capabilities below, starting from
cr:read, which every request includes; the others are what the person's MCP door allows; GET /api/v1/meup to 600 times an hour for each person, shared by every outside app acting for them.
It never gets the person's email address, and there
is no OpenID Connect: no ID token. Who the person is comes from
GET /api/v1/me.
| Scope | What the page says | Who can ask |
|---|---|---|
cr:read |
Read recorded game data | any app; always included |
follows:write |
Change who you follow | any app |
account:write |
Update account preferences | any app |
feedback:write |
Send feedback | any app |
account:email |
Know your email address | family apps only |
The endpoints are /.well-known/oauth-authorization-server,
/.well-known/oauth-protected-resource, /oauth/register,
/oauth/authorize, /oauth/token, /oauth/revoke and, for a family
app holding account:email, /oauth/userinfo. Every parameter, error
and token lifetime is on Protocol: OAuth 2.1.
GET /api/v1/me
https://elixir.poapkings.com/api/v1/me is the one request a signed-in
app makes: send the access token as Authorization: Bearer <token>,
from a grant whose resource is https://elixir.poapkings.com/api/v1.
The OpenAPI document describes it, and its
info.version is this door's own version, separate from the MCP
contract.
A success is { "data": ..., "request_id": "..." }, with the same id in
an x-request-id header. data holds:
account_id: the person's Elixir account, the same value as/oauth/userinfo'ssub, and the same for as long as the account lives;principal: who they are to Elixir, as an MCPinitializesays it; itssubjectis their primary player;players: the players they follow, with each one's tag, name, clan and relationship:primary(them),alt(also them), orfriend(every other follow, since JSON API 6.0.0). The one withis_primarytrue is who they play as, andclaim_statusisverifiedonce they proved it is theirs; itsnameis that player's game name as Elixir last recorded it;avatar: their profile image, ornullwhen they chose none (below);email: only for a family app holdingaccount:email.
Names (a game name, a nickname, a clan's name) come exactly as Clash Royale sent them. Elixir stores them unchanged and never cleans them, so treat each one as untrusted text and escape it where you show it.
The profile image
avatar is the Clash Royale card the person picked in Settings ›
Profile:
"avatar": {
"card_id": 26000000,
"name": "Knight",
"art_url": "https://elixir.poapkings.com/assets/cards/26000000.png",
"crop": { "x": 43, "y": 40, "scale": 1.39 }
}
Draw it the way Elixir does, with CSS alone: a box with
overflow: hidden and border-radius: 50%, and inside it the image at
width: 100%; height: 100%; object-fit: cover,
object-position: <x>% <y>% and transform: scale(<scale>). The crop is
Elixir's, so the circle matches the one on Elixir, and it follows when
Elixir re-tunes a card. Never resize or re-encode the art; when it fails
to load, show your own placeholder. name is for alt text.
/api/v1 answers nothing else. Elixir has people and their agents, and
an agent reads through MCP.
Errors
An error is application/problem+json: type, title, status, a
code to branch on, a detail to show and the request_id, with a
Retry-After header when a retry will help.
| Status | Code | When |
|---|---|---|
| 400 | invalid_json |
the body is not a JSON object; send none on a GET |
| 401 | unauthenticated |
no token, or one that is expired, revoked or for another door |
| 404 | not_found |
any path or method but GET /api/v1/me, before a token is read |
| 429 | rate_limited |
an outside app past 600 an hour for this person; Retry-After is the seconds to the top of the hour |
| 500 | internal |
a fault on Elixir's side that a retry will not fix |
| 503 | temporarily_unavailable |
the database was briefly unreachable; retry after Retry-After |
Quote the request_id when you report a problem.