Interface OauthLinkInfo

Information about the OAuth authorization.

interface OauthLinkInfo {
    @type: "oauthLinkInfo";
    bot_user_id: number;
    browser: string;
    dapp_client_id: string;
    domain: string;
    from_app?: boolean;
    ip_address: string;
    location: string;
    match_code_first?: boolean;
    match_codes: string[];
    platform: string;
    request_phone_number_access?: boolean;
    request_ton_wallet_access?: boolean;
    request_write_access?: boolean;
    ton_connect_manifest_url: string;
    ton_proof_payload: string;
    url: string;
    user_id: number;
    verified_app_name: string;
}

Properties

@type: "oauthLinkInfo"
bot_user_id: number

User identifier of a bot linked with the website.

browser: string

The version of a browser used for the authorization.

dapp_client_id: string

Hex-encoded public X25519 key of the dApp; may be empty if TON wallet access wasn't requested.

domain: string

A domain of the URL.

from_app?: boolean

True, if the authorization originates from an application.

ip_address: string

IP address from which the authorization is performed, in human-readable format.

location: string

Human-readable description of a country and a region from which the authorization is performed, based on the IP address.

match_code_first?: boolean

True, if a code matching dialog must be shown first and checkOauthRequestMatchCode must be called before acceptOauthRequest. Otherwise, checkOauthRequestMatchCode must not be called.

match_codes: string[]

The list of codes to match; may be empty if irrelevant.

platform: string

Operating system the browser is running on.

request_phone_number_access?: boolean

True, if the user must be asked for the permission to share their phone number.

request_ton_wallet_access?: boolean

True, if access to the user's TON wallet is requested by the app. If true and the user agrees to give access, then use createTonConnectSession with dapp_client_id and ton_connect_manifest_url to create the TON Connect session, then setTonConnectSessionWalletClientId, then create a tonWalletOwnershipProof for the given domain with the payload ton_proof_payload, and then pass all data to acceptOauthRequest in the parameter ton_connect_connect_data.

request_write_access?: boolean

True, if the user must be asked for the permission for the bot to send them messages.

ton_connect_manifest_url: string

URL of the TON Connect manifest of the dApp; may be empty if TON wallet access wasn't requested.

ton_proof_payload: string

Payload for TON wallet ownership proof; may be empty if TON wallet access wasn't requested.

url: string

An HTTP URL where the user authorizes.

user_id: number

Identifier of the user for whom the link was generated; may be 0 if unknown. The corresponding user may be unknown. If the user is logged in to the application, then they must be chosen for authorization by default.

verified_app_name: string

Verified name of the application; if empty, then "Unverified App" must be shown instead.