apistockdocs
API reference/Auth

Sign in with an Apple ID token

POST/v1/auth/apple/token

For iOS apps. Returns a session like `POST /v1/auth/login`, or 202 with a second-factor challenge.

no auth

Request body application/json · required

authorization_codestring

authorizationCode, exchanged for a refresh token revoked when the account is deleted

max length 4096
id_tokenstringrequired

identityToken from ASAuthorizationAppleIDCredential

max length 16384
namestring

fullName, which Apple gives only the first time

max length 200
noncestringrequired

From POST /v1/auth/apple/nonce, before hashing

max length 256
transportstring

bearer (native apps): the token in the response; cookie: an HttpOnly session cookie

one of "cookie", "bearer" · default "bearer"

Responses

200OKapplication/json
mfaobject
challenge_tokenstringrequired

Send it to POST /v1/auth/login/mfa. It is shown once.

expires_atstring (date-time)required
methodsarray of stringrequired

Second factors accepted: totp (a code from the authenticator app), passkey or recovery_code

sessionobject
created_atstring (date-time)required
currentbooleanrequired

The session making this request

expires_atstring (date-time)required

When the session ends unless used again

idstringrequired
ipstring
last_seen_atstring (date-time)required
mfa_verifiedbooleanrequired

Signed in or confirmed with a second factor

user_agentstring
tokenstring

Only with transport bearer: send it as Authorization: Bearer <token>. It is shown once.

userobject
created_atstring (date-time)required
emailstringrequired
email_verifiedbooleanrequired
has_passwordbooleanrequired

The account has a password; accounts created with Google or Apple don't, until they reset one

idstringrequired
rolesarray of stringrequired

Platform roles, such as platform_admin

401Unauthorizedapplication/problem+json
codestringrequired

Stable machine-readable error code

detailstring

Human-readable explanation

errorsarray of object

Field-level validation errors

request_idstring

Correlates with server logs and traces

statusinteger (int64)required

HTTP status code

titlestringrequired

Short summary of the problem type

typestring

URI identifying the problem type

403Forbiddenapplication/problem+json
codestringrequired

Stable machine-readable error code

detailstring

Human-readable explanation

errorsarray of object

Field-level validation errors

request_idstring

Correlates with server logs and traces

statusinteger (int64)required

HTTP status code

titlestringrequired

Short summary of the problem type

typestring

URI identifying the problem type

422Unprocessable Entityapplication/problem+json
codestringrequired

Stable machine-readable error code

detailstring

Human-readable explanation

errorsarray of object

Field-level validation errors

request_idstring

Correlates with server logs and traces

statusinteger (int64)required

HTTP status code

titlestringrequired

Short summary of the problem type

typestring

URI identifying the problem type

500Internal Server Errorapplication/problem+json
codestringrequired

Stable machine-readable error code

detailstring

Human-readable explanation

errorsarray of object

Field-level validation errors

request_idstring

Correlates with server logs and traces

statusinteger (int64)required

HTTP status code

titlestringrequired

Short summary of the problem type

typestring

URI identifying the problem type

503Service Unavailableapplication/problem+json
codestringrequired

Stable machine-readable error code

detailstring

Human-readable explanation

errorsarray of object

Field-level validation errors

request_idstring

Correlates with server logs and traces

statusinteger (int64)required

HTTP status code

titlestringrequired

Short summary of the problem type

typestring

URI identifying the problem type

v0.5
esc
↑↓ move↵ openesc close