Limits
| Limit | Value |
|---|
Grant code expires_in | 60–900 seconds, 900 by default |
Sign-in max_session_seconds | 300–2592000 seconds (5 minutes–30 days), 7 days by default |
| Access token lifetime | at most 1 hour, never beyond the sign-in’s expiry |
resources entries | 1–50 |
Each resource’s params | at most 4096 bytes once serialized |
customer.metadata | at most 16 keys, each key and value at most 256 characters |
customer_id | letters, digits and _ . : @ -, at most 256 bytes, no anon_ prefix, auth reserved |
| Publishable key name | 1–64 characters |
| Directory paging | 20 by default, at most 100 |
| Anonymous sign-in lifetime | a fixed 7 days |
Error codes
| Code | HTTP | Fix |
|---|
GRANT_CODE_INVALID | 401 | The grant code is invalid, expired or already used; issue a new one |
ACCESS_TOKEN_EXPIRED | 401 | The token expired but the sign-in is live; renew it (the browser scripts do this) |
SIGN_IN_EXPIRED | 401 | The sign-in expired; issue a new grant code and sign in again |
SIGN_IN_REVOKED | 401 | The sign-in was revoked (a block or a token revoke); sign in again |
CUSTOMER_BLOCKED | 403 | The viewer is blocked; unblock before signing in again |
ORIGIN_NOT_ALLOWED | 403 | The request origin differs from the code’s bound origin; make the request from the bound origin |
RESOURCE_NOT_GRANTED | 403 | The token’s grant does not cover this resource; add the scope when issuing |
CUSTOMER_NOT_FOUND | 404 | The viewer is not in your organization; check customer_id |
INVALID_PARAMS | 400 | A request field is wrong; fix what message names |
UPSTREAM_UNAVAILABLE | 502 | Token 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