Skip to contentSkip to navigationSkip to topbar
Page toolsOn this pageProducts used
Looking for more inspiration?Visit the

20105: Access Token not yet valid


ERROR: 20105

error-20105 page anchor
API, VIDEO
ERROR

This error indicates that the Access Token presented to Twilio is not valid yet. Twilio Access Tokens are JSON Web Tokens that can include an optional nbf claim which defines the earliest time the token is accepted; if nbf is in the future relative to the validating system, the request will fail with this error.

Possible causes

possible-causes page anchor
  • The token's nbf (not-before) claim is set to a future timestamp, so the token is not yet accepted for use.
  • Clock drift or incorrect system time on the machine generating or validating the token causes the current time to fall before the token's validity start.
  • In Programmable Video apps, attempting to connect with a token before it becomes valid triggers an SDK error corresponding to this code.
  • Ensure the system time on token-issuing and validating hosts is correct; resolve any clock drift so the current time is on or after the token's intended start.
  • When creating Access Tokens, avoid setting nbf in the future unless required; if used, set nbf to the current epoch time so the token is immediately valid, and ensure iat reflects the actual issuance time.
  • Reissue the token closer to the time of use (with an appropriate ttl) so it becomes valid when needed; Access Tokens are short-lived (maximum 24 hours).
  • For Video SDK apps, wait until the token becomes valid or obtain a fresh token before calling connect to a Room to avoid the corresponding SDK error.

Additional resources

additional-resources page anchor