Name the account a sign-in link signs into, without spending it
POST/api/auth/login/magic-link/inspect
inspectMagicLink
Anonymous and idempotent: the token is NOT consumed. Returns 200 with the handle of the account `/api/auth/login/magic-link/confirm` would sign in, so the landing page can say "Sign in as @handle" before anything happens — a link someone mailed to their own account and handed to you names their account, not yours. Returns 410 with `{ error: "invalid_or_expired" }` for every token confirm would refuse (missing, spent, expired, wrong-purpose, or an account that no longer holds the address verified or holds no password, TOTP or passkey). Rate limited per source IP.
Authentication is not described for this operation in the spec — that does not mean it is public. Check tokens and scopes.
curl
curl -X POST 'https://neosource.dev/api/auth/login/magic-link/inspect' \
-H 'Content-Type: application/json' \
-d '{"token":"string"}'fetch
fetch("https://neosource.dev/api/auth/login/magic-link/inspect", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({"token":"string"}),
});Request bodyrequired
application/json
Responses
200The link is live and signs into this account
application/json
Standard errors
Bodies documented once for the whole API — see standard errors.
- 400Bad Request — one of: invalid_input
- 410Gone — one of: invalid_or_expired
- 429Rate limited — retry after the interval in the `Retry-After` header
- 500Internal server error
- 503Service temporarily unavailable / at capacity — retry after the `Retry-After` header
- 504Gateway timeout — the request exceeded the server's handling budget