IGPAPI
    Preparing search index...

    Interface AndroidSnapshotInput

    A snapshot built by hand — an account that already exists in the caller's own system, brought onto a phone of its own — for AndroidIgpapi.launch({ snapshot, seed?, … }). Every member is typed from the library's own state schemas, and every member is optional: a part the snapshot lacks is the library's own.

    • device: the whole device state or none. A complete device (its android id id, uuid, phoneId, familyId, adid, descriptor — the part of the user agent that names the phone: 30/11; 420dpi; 1080x2340; samsung; SM-G991B; o1s; exynos2100 — build, language, …) is kept exactly as given; without it the whole device is generated from seed (a random one without a seed), the way AndroidIgpapi.install generates it. No field is ever filled in from the seed into a device the caller gave, and a seed beside a given device is unused. The user agent is not an input: the library builds it from the device and the application.
    • application: the whole application profile or none. Without it the process presents the library's own build. A launch is an app update, so a profile of another build than the library's is replaced by it.
    • session: the session, as the app holds it (any subset; what is not given is the empty session's). With a signed-in session (authorization) the launch is the signed-in app's cold start and the program receives the feed; without a session the program receives the login home on the device. The account id has one source, the authorization: an omitted or empty dsUserId is read from a Bearer IGT:2: authorization, and one that names another account is a SnapshotDecodeError.
    • cookies: the cookie jar in the serialized form of tough-cookie.

    The JSON text of such a snapshot is handled exactly like the object. A snapshot exported by ExportSnapshot is such a value too. checkpoint() after the launch gives the library's own format.

    interface AndroidSnapshotInput {
        application?: {
            adaptiveUi?: boolean;
            APP_VERSION: string;
            APP_VERSION_CODE: string;
            BLOKS_VERSION_ID: string;
            bloksClientContext?: {
                keys: readonly (
                    "bloks_version"
                    | "styles_id"
                    | "theme_params"
                    | "pixel_ratio"
                )[];
            };
            bloksInfraTheme?: string;
            bloksPrismExtendedPalette?: { gray: boolean; polish: boolean };
            bloksThemeParams?: readonly {
                design_system_name: string;
                value: readonly string[];
            }[];
            BREADCRUMB_KEY: string;
            CAPABILITIES: string;
            directInboxMode?: number;
            directSearchGenAiBotsLimit?: number;
            FACEBOOK_ANALYTICS_APPLICATION_ID: string;
            FACEBOOK_ANALYTICS_CLIENT_TOKEN?: string;
            GRAPHQL_DOC_IDS?: { readonly [key: string]: string };
            GRAPHQL_OMIT_PRETTY?: boolean;
            GRAPHQL_SERVER_TIMESTAMPS?: "true" | "timestamp";
            launchWire?: "451";
            mediaLikeWire?: "rest" | "graphql";
            mediaRepostWire?: "note-with-text" | "editor";
            reelsTrayPageSize?: number;
            RMD_NO_VALID_MAP_TIMES?: { recvTime: string; reqTime: string };
            shoppingExperiments?: readonly string[];
            SUPPORTED_CAPABILITIES: readonly { name: string; value: string }[];
            ZERO_HEADERS?: {
                authenticated: { balance: string; eh: string };
                "logged-out": { balance: string; eh: string };
                "rmd-evaluated": { balance: string; eh: string };
            };
        };
        cookies?: unknown;
        device?: {
            adid: string;
            adsOptOut?: boolean;
            androidDevicePerformanceClass?: number;
            aymhAccounts?: readonly { readonly [key: string]: unknown }[];
            battery?:
                | { kind: "charging"; startedAtMs: number; startLevel: number }
                | {
                    kind: "discharging";
                    percentPerHour: number;
                    startedAtMs: number;
                    startLevel: number;
                };
            build: string;
            cloudTrustToken?: string;
            currentKeyboardLanguage?: string;
            descriptor: string;
            deviceStatus?: { readonly [key: string]: unknown };
            familyDeviceSynced?: boolean;
            familyId: string;
            flashCallPermissionsStatus?: {
                ANSWER_PHONE_CALLS: "GRANTED" | "DENIED";
                READ_CALL_LOG: "GRANTED" | "DENIED";
                READ_PHONE_STATE: "GRANTED" | "DENIED";
            };
            gmsCallRetrieverEligibility?: "eligible"
            | "not_eligible";
            gpuMemoryMb?: number;
            hasCameraPermission?: boolean;
            hasGoogleAdId?: boolean;
            id: string;
            isFoldable?: boolean;
            isLayoutRTL: boolean;
            keyboardLanguage?: string;
            language: string;
            location?: { lat: number; lng: number };
            network?: { kind: "cellular"; radio: "LTE" } | { kind: "wifi" };
            networkInfo?: {
                active_subscriptions_info: null;
                default_subscription_info: {
                    group_id_level_1: number | null;
                    is_data_roaming: number;
                    is_esim: number | null;
                    is_gsm_roaming: number;
                    is_mobile_data_enabled: number;
                    is_sim_sms_capable: number | null;
                    network_operator: string | number;
                    network_type: string | number | null;
                    signal_strength: number;
                    sim_carrier_id: number;
                    sim_carrier_id_name: string | null;
                    sim_operator: string | number;
                    sim_operator_name: string;
                    sim_state: number;
                };
                is_active_network_cellular: number;
                is_airplane_mode: number;
                is_device_sms_capable: number;
                is_wifi: number;
                sim_count: number;
            };
            networkSessionId?: string;
            phoneId: string;
            pushHpkeIdentity?: {
                keystoreId: string;
                privKeyPem: string;
                pubKeyB64: string;
            };
            pushToken?: string;
            radioType?: string;
            systemLanguages?: readonly string[];
            systemLocale?: string;
            timezoneName?: string;
            timezoneOffset: string;
            usdidIdentity?: {
                kid: string;
                privKeyPem: string;
                pubKeySpkiB64: string;
                uuid: string;
            };
            uuid: string;
            zeroAttestationIdentity?: {
                keyHash: string;
                privKeyPem: string;
                uploadedAtMs: number;
            };
        };
        session?: Partial<
            {
                appStartPhase?: "cold";
                appStartTimeMs?: number;
                authorization?: string;
                bandwidth?: { bytes: number; carried?: true; ms: number };
                challenge?: { readonly [key: string]: unknown };
                checkpoint?: { readonly [key: string]: unknown };
                clientSessionIdLifetime: number;
                dsUserId?: string;
                familyDeviceIdBound?: boolean;
                igWWWClaim?: string;
                msgrRegion?: string;
                passwordEncryptionKeyId?: string;
                passwordEncryptionPubKey?: string;
                pigeonSessionIdLifetime: number;
                regionHint?: string;
                rmd?: { kind: "no-valid-map" | "url-eligible" };
                rur?: string;
                sessionStartPhase?: "starting";
                shbid?: string;
                shbts?: string;
                thumbnailCacheBustingValue: number;
                xMetaUsdid?: string;
                xMid?: string;
                zeroInterface?: boolean;
                zeroPhase?: "logged-out" | "authenticated" | "rmd-evaluated";
            },
        >;
    }
    Index

    Properties

    application?: {
        adaptiveUi?: boolean;
        APP_VERSION: string;
        APP_VERSION_CODE: string;
        BLOKS_VERSION_ID: string;
        bloksClientContext?: {
            keys: readonly (
                "bloks_version"
                | "styles_id"
                | "theme_params"
                | "pixel_ratio"
            )[];
        };
        bloksInfraTheme?: string;
        bloksPrismExtendedPalette?: { gray: boolean; polish: boolean };
        bloksThemeParams?: readonly {
            design_system_name: string;
            value: readonly string[];
        }[];
        BREADCRUMB_KEY: string;
        CAPABILITIES: string;
        directInboxMode?: number;
        directSearchGenAiBotsLimit?: number;
        FACEBOOK_ANALYTICS_APPLICATION_ID: string;
        FACEBOOK_ANALYTICS_CLIENT_TOKEN?: string;
        GRAPHQL_DOC_IDS?: { readonly [key: string]: string };
        GRAPHQL_OMIT_PRETTY?: boolean;
        GRAPHQL_SERVER_TIMESTAMPS?: "true" | "timestamp";
        launchWire?: "451";
        mediaLikeWire?: "rest" | "graphql";
        mediaRepostWire?: "note-with-text" | "editor";
        reelsTrayPageSize?: number;
        RMD_NO_VALID_MAP_TIMES?: { recvTime: string; reqTime: string };
        shoppingExperiments?: readonly string[];
        SUPPORTED_CAPABILITIES: readonly { name: string; value: string }[];
        ZERO_HEADERS?: {
            authenticated: { balance: string; eh: string };
            "logged-out": { balance: string; eh: string };
            "rmd-evaluated": { balance: string; eh: string };
        };
    }
    cookies?: unknown
    device?: {
        adid: string;
        adsOptOut?: boolean;
        androidDevicePerformanceClass?: number;
        aymhAccounts?: readonly { readonly [key: string]: unknown }[];
        battery?:
            | { kind: "charging"; startedAtMs: number; startLevel: number }
            | {
                kind: "discharging";
                percentPerHour: number;
                startedAtMs: number;
                startLevel: number;
            };
        build: string;
        cloudTrustToken?: string;
        currentKeyboardLanguage?: string;
        descriptor: string;
        deviceStatus?: { readonly [key: string]: unknown };
        familyDeviceSynced?: boolean;
        familyId: string;
        flashCallPermissionsStatus?: {
            ANSWER_PHONE_CALLS: "GRANTED" | "DENIED";
            READ_CALL_LOG: "GRANTED" | "DENIED";
            READ_PHONE_STATE: "GRANTED" | "DENIED";
        };
        gmsCallRetrieverEligibility?: "eligible"
        | "not_eligible";
        gpuMemoryMb?: number;
        hasCameraPermission?: boolean;
        hasGoogleAdId?: boolean;
        id: string;
        isFoldable?: boolean;
        isLayoutRTL: boolean;
        keyboardLanguage?: string;
        language: string;
        location?: { lat: number; lng: number };
        network?: { kind: "cellular"; radio: "LTE" } | { kind: "wifi" };
        networkInfo?: {
            active_subscriptions_info: null;
            default_subscription_info: {
                group_id_level_1: number | null;
                is_data_roaming: number;
                is_esim: number | null;
                is_gsm_roaming: number;
                is_mobile_data_enabled: number;
                is_sim_sms_capable: number | null;
                network_operator: string | number;
                network_type: string | number | null;
                signal_strength: number;
                sim_carrier_id: number;
                sim_carrier_id_name: string | null;
                sim_operator: string | number;
                sim_operator_name: string;
                sim_state: number;
            };
            is_active_network_cellular: number;
            is_airplane_mode: number;
            is_device_sms_capable: number;
            is_wifi: number;
            sim_count: number;
        };
        networkSessionId?: string;
        phoneId: string;
        pushHpkeIdentity?: {
            keystoreId: string;
            privKeyPem: string;
            pubKeyB64: string;
        };
        pushToken?: string;
        radioType?: string;
        systemLanguages?: readonly string[];
        systemLocale?: string;
        timezoneName?: string;
        timezoneOffset: string;
        usdidIdentity?: {
            kid: string;
            privKeyPem: string;
            pubKeySpkiB64: string;
            uuid: string;
        };
        uuid: string;
        zeroAttestationIdentity?: {
            keyHash: string;
            privKeyPem: string;
            uploadedAtMs: number;
        };
    }
    session?: Partial<
        {
            appStartPhase?: "cold";
            appStartTimeMs?: number;
            authorization?: string;
            bandwidth?: { bytes: number; carried?: true; ms: number };
            challenge?: { readonly [key: string]: unknown };
            checkpoint?: { readonly [key: string]: unknown };
            clientSessionIdLifetime: number;
            dsUserId?: string;
            familyDeviceIdBound?: boolean;
            igWWWClaim?: string;
            msgrRegion?: string;
            passwordEncryptionKeyId?: string;
            passwordEncryptionPubKey?: string;
            pigeonSessionIdLifetime: number;
            regionHint?: string;
            rmd?: { kind: "no-valid-map" | "url-eligible" };
            rur?: string;
            sessionStartPhase?: "starting";
            shbid?: string;
            shbts?: string;
            thumbnailCacheBustingValue: number;
            xMetaUsdid?: string;
            xMid?: string;
            zeroInterface?: boolean;
            zeroPhase?: "logged-out" | "authenticated" | "rmd-evaluated";
        },
    >