Interface AcceptOauthRequest

Accepts an OAuth authorization request. Returns an HTTP URL to open after successful authorization. May return an empty link if just a toast about successful login has to be shown. Request type for Tdjson#acceptOauthRequest.

interface AcceptOauthRequest {
    @type: "acceptOauthRequest";
    allow_phone_number_access?: boolean;
    allow_write_access?: boolean;
    match_code: string;
    ton_connect_connect_data: TonConnectConnectData;
    url: string;
}

Properties

@type: "acceptOauthRequest"
allow_phone_number_access?: boolean

Pass true if the current user allowed the bot that was returned in getOauthLinkInfo to access their phone number.

allow_write_access?: boolean

Pass true if the current user allowed the bot that was returned in getOauthLinkInfo to send them messages.

match_code: string

The matching code chosen by the user.

ton_connect_connect_data: TonConnectConnectData

Pass data required to access the user's TON wallet via TON Connect if the current user allowed this; pass null if the access wasn't requested or the user declined access.

url: string

URL of the OAuth deep link.