Skip to main content

Retry Service Authorization

Request another authorization attempt for a ServiceAuthType.

API Reference

Swift
/// Retries authentication for the specified service.
/// - Parameters:
///   - service: The service whose authentication should be retried.
///   - completion: A closure that is called when the operation completes.
///     - success: `true` if the operation was successful; otherwise `false`.
///     - error: An `NSError` object that describes the error that occurred, or `nil` if the operation was successful.
func retryServiceAuth(
    _ service: ServiceAuthType,
    completion: AIBudsCompletionHandler?
)

See retryServiceAuth.

SwiftObjective-CService
.starBurstAIBudsServiceAuthTypeStarBurstStarBurst AI
.onDeviceVoiceAssistantAIBudsServiceAuthTypeOnDeviceVoiceAssistantOn-device voice assistant
Swift
guard let device = device as? DeviceServiceAuthAPI else { return }
device.retryServiceAuth(.starBurst) { success, error in
    if !success { print(error?.localizedDescription ?? "Authorization retry failed") }
}

Completion means the retry request was accepted or failed; read updated authorization state or handle SDK authorization callbacks before declaring the service authorized.