20104: Access Token expired or expiration date invalid
API, IAM
WARNING
This warning occurs when the Access Token sent to a Twilio API is no longer valid because its exp claim is in the past, the expiration time in the token is invalid, or the expiration was set beyond the maximum allowed lifetime. Access Token lifetimes are configurable up to 24 hours, and tokens should be as short-lived as feasible for your application. You can also validate token structure with standard JWT tools.
Access Tokens are used by multiple Twilio client SDKs, including Voice, Conversations, Sync, and Video.
- The token's
expclaim indicates a time that has already passed, so the Access Token has expired. - The expiration time in the token is invalid (for example, not a valid value), causing the token to be rejected.
- The expiration time was set too far in the future, exceeding the maximum allowed lifetime for Access Tokens (up to 24 hours).
- Regenerate the Access Token with an appropriate
ttlthat does not exceed 24 hours, following the guidance to keep tokens as short-lived as feasible. - Implement client-side handling to refresh Access Tokens before they expire using the SDKs' token update/expiration mechanisms.
- Verify the token is well-formed and that time-based claims (such as
exp) are set correctly according to JWT/Access Token requirements before sending requests.