Skip to main content
View as Markdown

Error Handling - Authentication

Error Handling​

Error CodeMeaningResolution
INVALID_APP_TOKEN_IDToken ID does not existVerify the id parameter; token may have been deleted
INVALID_APP_TOKEN_HASHHMAC hash mismatchRecompute SHA256(widget_ks + app_token_value) — verify encoding and confirm input is the exact raw concatenation
APP_TOKEN_NOT_ACTIVEToken is disabled (status != 2)Re-enable with appToken.update or create a new token
EXPIRED_TOKENToken has passed its expiry timestampCreate a new token with a future expiry
PROPERTY_VALIDATION_NOT_UPDATABLEAttempted to change hashType after creationhashType is immutable — create a new token with the desired hash type
INVALID_KSThe KS used to call the API is invalid or expiredGenerate a fresh admin KS via session.start

Retry strategy: For transient errors (HTTP 5xx, timeouts), retry with exponential backoff: 1s, 2s, 4s, with jitter, up to 3 retries. For client errors (INVALID_APP_TOKEN_HASH, INVALID_KS, EXPIRED_TOKEN, validation errors), fix the request parameters before retrying — these require a corrected request to succeed.