15.2. About API token expiration
API tokens expire one year from the creation date. RHACS alerts you in the web interface and by sending log messages to Central when a token will expire in less than one week. The log message process runs once an hour. Once a day, the process lists the tokens that are expiring and creates a log message for each one. Log messages are issued once a day and appear in Central logs.
Logs have the format as shown in the following example:
Warn: API Token [token name] (ID [token ID]) will expire in less than X days.
You can change the default settings for the log message process by configuring the environment variables shown in the following table:
| Environment variable | Default value | Description |
| ROX_TOKEN_EXPIRATION_NOTIFIER_INTERVAL | 1h (1 hour) | The frequency at which the log message background loop that lists tokens and creates the logs will run. |
| ROX_TOKEN_EXPIRATION_NOTIFIER_BACKOFF_INTERVAL | 24h (1 day) | The frequency at which the loop lists tokens and issues notifications. |
| ROX_TOKEN_EXPIRATION_DETECTION_WINDOW | 168h (1 week) | The time period before expiration of the token that will cause the notification to be generated. |