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
- Store the
expires_invalue returned during the token response. - Track the elapsed time since the token was issued.
- Request a new token before the current one expires.
- If using a refresh token, follow the OAuth 2.0 refresh flow to obtain a new access token securely.
- Do not rely on automatic retries without checking the token's validity.