boolean_smtp_oauth_refresh_success
Fires after an OAuth token refresh succeeds.
action Tier A Since 1.0.0
Fired by the scheduled refresh job and by a manual refresh from the admin UI alike, with the same payload.
Signature
add_action( 'boolean_smtp_oauth_refresh_success', $callback, 10, 1 );Parameters
| Parameter | Type | Description |
|---|---|---|
$payload | array<string, mixed> | |
connection_id | int | Id of the refreshed connection. |
driver | string | Normalized OAuth driver (`google`, `outlook`, `zoho`). |
attempts | int | Number of attempts made. |
response_time_ms | int | Time the token exchange took, in milliseconds. |
token_expires_at | int|null | Unix timestamp the new token expires at, null when unknown. |
token_seconds_remaining | int|null | Seconds remaining until expiry, null when unknown. |
Fires in
app/Http/Controllers/ConnectionController.php:1816—BooleanSmtp\Http\Controllers\ConnectionController::refreshOAuthNow()app/Jobs/OAuthRefreshJob.php:217—BooleanSmtp\Jobs\OAuthRefreshJob::handle()
Example
add_action( 'boolean_smtp_oauth_refresh_success', function ( array $payload ) { // React to the event.}, 10, 1 );Next steps
- Connections and OAuth — every hook in this area, in firing order where that applies.
- Hook Explorer — filter and search every hook.