Skip to content
中文

Limits and errors

Limits

LimitValue
Grant code expires_in60–900 seconds, 900 by default
Sign-in max_session_seconds300–2592000 seconds (5 minutes–30 days), 7 days by default
Access token lifetimeat most 1 hour, never beyond the sign-in’s expiry
resources entries1–50
Each resource’s paramsat most 4096 bytes once serialized
customer.metadataat most 16 keys, each key and value at most 256 characters
customer_idletters, digits and _ . : @ -, at most 256 bytes, no anon_ prefix, auth reserved
Publishable key name1–64 characters
Directory paging20 by default, at most 100
Anonymous sign-in lifetimea fixed 7 days

Error codes

CodeHTTPFix
GRANT_CODE_INVALID401The grant code is invalid, expired or already used; issue a new one
ACCESS_TOKEN_EXPIRED401The token expired but the sign-in is live; renew it (the browser scripts do this)
SIGN_IN_EXPIRED401The sign-in expired; issue a new grant code and sign in again
SIGN_IN_REVOKED401The sign-in was revoked (a block or a token revoke); sign in again
CUSTOMER_BLOCKED403The viewer is blocked; unblock before signing in again
ORIGIN_NOT_ALLOWED403The request origin differs from the code’s bound origin; make the request from the bound origin
RESOURCE_NOT_GRANTED403The token’s grant does not cover this resource; add the scope when issuing
CUSTOMER_NOT_FOUND404The viewer is not in your organization; check customer_id
INVALID_PARAMS400A request field is wrong; fix what message names
UPSTREAM_UNAVAILABLE502Token issuance is temporarily unavailable; retry later

Tokens and revocation

An access token lives at most an hour, and every renewal needs a live sign-in. After a block or a revoke_tokens call the tokens that viewer holds stop working at once; a token already issued but not yet expired survives at most another hour. Remove a viewer with DELETE /customer/v1/customers/{customer_id}?confirm={customer_id}.

Next steps