# boolean_smtp_oauth_refresh

> Fires on the OAuth refresh interval; each run renews the access tokens that are about to expire.

Action · Tier B · Since 1.0.0

Scheduled on `init` when not yet scheduled, at the interval the `oauth_refresh_interval` setting defines (the `boolean_smtp_oauth_refresh` WP-Cron schedule). Outcomes are announced through `boolean_smtp_oauth_refresh_success` and `boolean_smtp_oauth_refresh_failed`.

## Signature

```php
add_action( 'boolean_smtp_oauth_refresh', $callback, 10, 0 );
```

## Parameters

No parameters.

## Fires in

- [app/Jobs/OAuthRefreshJob.php:0](https://github.com/booleanpress/boolean-smtp-src/blob/main/app/Jobs/OAuthRefreshJob.php) — `BooleanSmtp\Jobs\OAuthRefreshJob::()`

## Example

```php
add_action( 'boolean_smtp_oauth_refresh', function () {
    // React to the event.
}, 10, 1 );
```
