---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/api/errors/45775#article
headline: "45775: Failed to refresh token. Invalid token provided."
url: https://www.twilio.com/docs/api/errors/45775
inLanguage: en
dateModified: 2026-06-08T11:29:20.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# 45775: Failed to refresh token. Invalid token provided.

Log Type: APPLICATION

Log Level: WARNING

## Description

This warning appears when Flex cannot refresh a session token because the token supplied in the refresh request is invalid. Flex user tokens are JWE tokens used to authenticate access to the Flex application, and the Flex SDK provides dedicated methods to validate, refresh, and update those tokens during a session.

### Possible causes

* The token sent in the refresh request is malformed or otherwise fails token validation.
* The token has expired, the expiration value is invalid, or the system that generated the token has incorrect time settings.
* The token was generated with invalid claims or account values, such as incorrect `iss` or `sub`.

### Possible solutions

* Generate a new Flex user token and retry the request. Flex user tokens are JWE tokens, and the token API supports a `ttl` value with a default of 3600 seconds.
* If you use the Flex SDK, call `refreshToken` with the current refresh token and `ssoProfileSid`. Use `validateToken` before retrying if you need to confirm that the token is still valid.
* After your backend issues a new token, pass it to `client.updateToken` so the current session and connected services use the updated credentials. Store the new token and refresh token that your application receives after a successful update.
* If validation continues to fail, reissue the token on your backend with the correct claims and account values. If you build your own authentication flow, keep token minting on the backend and do not expose `AuthToken` in front-end applications.

#### Additional resources

* [Flex SDK authentication](/docs/flex/developer/flex-sdk/authentication)
* [Flex SDK methods](/docs/flex/developer/flex-sdk/sdk-methods)
* [Flex User Token API](/docs/flex/developer/user-management/flex-token-api)
