< Back

Manage Expired Tokens

Access tokens issued by Health Gorilla expire after a short duration to limit unauthorized reuse. You must detect expiration, request new tokens as needed, and avoid hardcoding token values in your application.

To manage token expiration

  1. Store the expires_in value returned during the token response.
  2. Track the elapsed time since the token was issued.
  3. Request a new token before the current one expires.
  4. If using a refresh token, follow the OAuth 2.0 refresh flow to obtain a new access token securely.
  5. Do not rely on automatic retries without checking the token's validity.