Usage
Description
Manually refresh your authentication token using the stored refresh token. Token refresh normally happens automatically when making API requests. Use this command to force an immediate refresh or to verify the refresh mechanism is working correctly.This command only works with OAuth sessions. API tokens and environment variable tokens cannot be refreshed.
Options
Output result as JSON. The JSON format includes
success, refreshed, message, expiresIn, and expiresAt fields.Force refresh even if token is still valid. By default, the command only refreshes if the token is expired or about to expire.
Examples
Basic refresh
Force refresh
Token still valid
If the token doesn’t need refreshing:JSON output
Limitations
Environment variable tokens
If you’re usingSENTRY_AUTH_TOKEN or SENTRY_TOKEN environment variables:
Manual API tokens
If you logged in withsentry auth login --token:
Related Commands
sentry auth login- Authenticate with Sentry using OAuthsentry auth status- View token expiration and auto-refresh statussentry auth logout- Log out and remove credentials