AIToolAuthorizer

constructor(connect: suspend (call: AIToolCallPart, url: String) -> Boolean, decline: suspend (call: AIToolCallPart) -> Unit)

Parameters

connect

Opens the sign-in page, the call's AIToolAuthorization.launchUrl, and returns once the person is back: true when the page came back saying the account is connected, which keeps the card connecting while your backend changes the call's step (and offers Connect again if, after a while, it hasn't), or false when they came back without connecting, which lets them connect again. Return false as soon as the person is back when your app can't tell. A thrown exception says the page couldn't be opened, and the person can try again.

decline

Tells your backend the person won't sign in now. Your backend ends the call, which never runs. A thrown exception lets the person answer again.