igpapi — Instagram private API Simulator for Node.js (API reference) 4.14.0
    Preparing search index...

    Interface MobileDeviceState

    interface MobileDeviceState {
        adid: string;
        adsOptOut?: boolean;
        androidDevicePerformanceClass?: number;
        aymhAccounts?: readonly Record<string, unknown>[];
        battery?: BatterySimulation;
        build: string;
        cloudTrustToken?: string;
        currentKeyboardLanguage?: string;
        descriptor: string;
        deviceStatus?: Readonly<Record<string, unknown>>;
        familyDeviceSynced?: boolean;
        familyId: string;
        fbnsKey?: { createdAt: number; publicKey: 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;
        hasNotificationPermission?: boolean;
        id: string;
        isFoldable?: boolean;
        isLayoutRTL: boolean;
        keyboardLanguage?: string;
        language: string;
        lastPushRegistration?: { at: number };
        location?: MobileDeviceLocation;
        mobileConfig?: MobileConfigStore;
        network?: MobileNetwork;
        networkInfo?: AndroidNetworkInfo;
        networkSessionId?: string;
        phoneId: string;
        pigeonIdentities?: {
            readonly [key: string]: {
                config?: { hash: string; timestamp: string };
                hmacTtl?: { expiresAt?: string; token: string };
                sampling?: { hash: string; timestamp: string };
            };
        };
        pushHpkeIdentity?: PushHpkeIdentity;
        pushToken?: string;
        radioType?: string;
        ramSizeInGb?: number;
        rmd?: MobileRmdState;
        rmdNoValidMapTimes?: RmdNoValidMapTimes;
        systemLanguages?: readonly string[];
        systemLocale?: string;
        timezoneName?: string;
        timezoneOffset: string;
        usdidIdentity?: UsdidIdentity;
        uuid: string;
        videoEncoders?: {
            readonly [key: string]: readonly {
                bitrate: readonly [number, number];
                complexity: readonly [number, number];
                encoder_name: string;
                frame_rate: readonly [number, number];
                height: readonly [number, number];
                height_alignment: number;
                max_instances: number;
                width: readonly [number, number];
                width_alignment: number;
            }[];
        };
        zeroAttestationIdentity?: ZeroAttestationIdentity;
    }
    Index

    Properties

    adid: string
    adsOptOut?: boolean

    Whether the device opted out of ad tracking (the tracking permission denied, "Allow Apps to Request to Track" off): iOS sends it as x-ads-opt-out (1 opted out, 0 allowed). A device fact, not a session one, and not derivable — how the app maps the permission to the header is not known. Optional: absent renders 0 (tracking allowed).

    androidDevicePerformanceClass?: number

    The device's performance class, sent as bk_context.android_device_performance_class on Bloks app-root requests. A device fact beside gpuMemoryMb, also the device's own: the Redroid emulator and a 451 phone both report 0. The Android generator sets that value; a device without the fact sends null. Optional: absent renders null.

    aymhAccounts?: readonly Record<string, unknown>[]

    Accounts the device may have (AYMH), sent as client_input_params.aymh_accounts on send_login_request. Device-local saved-account state, empty on a first login. Optional: absent renders [] (the older 448 devices); one 448 device carries one blank entry.

    The simulation the device's battery and charging readings are derived from: the level at startedAtMs, the discharge while it is not charging and whether it is on charge. The reading itself is not stored — every request reads it at its own time (batteryReadingOf in mobile.device.ts), so a snapshot carries the simulation, never a stale measurement. Absent, the reading is simulated from the device id and the clock.

    build: string
    cloudTrustToken?: string

    The Meta cloud trust token stored on the device (two upper-case UUIDs written back to back, 72 characters), sent by iOS as x-cloud-trust-token. Optional: how the app derives it on a new device is not known, so a device without it sends no header rather than an invented token.

    currentKeyboardLanguage?: string

    The keyboard language currently in use (ru-RU), iOS x-ig-device-languages.

    descriptor: string
    deviceStatus?: Readonly<Record<string, unknown>>

    The device's hardware decode capability block (hw_av1_dec, chip_name, core_count, …) as the device holds it; the request that sends it (clips/discover/stream's device_status) serializes it. The library models no hardware: absent renders an empty object.

    familyDeviceSynced?: boolean

    Persisted flag: whether the family device id / app-scoped device id pair has already been synced with the server. A fresh install syncs it once (FamilyDeviceIDAppScopedDeviceIDSyncMutation); a device that already ran the sync skips it. Absent means not yet synced (fresh), matching the older 448 devices; one 448 device declares it true.

    familyId: string
    fbnsKey?: { createdAt: number; publicKey: string }

    The Android device's FBNS key: the P-256 key the app's own push service (FBNS) creates once per install — one key across processes, logins and notification-gateway connections — and binds those connections to. publicKey is the 65-byte key 0x40 ‖ X ‖ Y in lower-case hex (the app's pub_key), createdAt its creation time in milliseconds. The device's push token is computed from it (packages/android/src/simulation/android.fbns-token.ts), exactly as the server's notification gateway returns it. Absent until the first push registration creates it.

    flashCallPermissionsStatus?: {
        ANSWER_PHONE_CALLS: "GRANTED" | "DENIED";
        READ_CALL_LOG: "GRANTED" | "DENIED";
        READ_PHONE_STATE: "GRANTED" | "DENIED";
    }

    Android runtime-permission grants the account-recovery search screen offers as client_input_params.flash_call_permissions_status. Device state the library cannot query. Optional: absent renders every permission DENIED (the login flow's spelling); the recovery flow's device granted READ_PHONE_STATE.

    gmsCallRetrieverEligibility?: "eligible" | "not_eligible"

    Google Mobile Services incoming-call-retriever eligibility, sent as client_input_params.gms_incoming_call_retriever_eligibility on send_login_request. The 448 login-home action script picks eligible / not_eligible from a device GMS signal the library cannot query, so it is device state. Optional: absent renders eligible (the older 448 devices); one 448 device reports not_eligible.

    gpuMemoryMb?: number

    The device's GPU memory, sent as bk_context.gpu_memory_mb on Bloks app-root requests. A device fact, never a build's: devices differ (a Redroid emulator reports 2048, a 6 GB phone 6144), so a declared reference device declares what its own value is. The Android generator models no hardware and sets the Redroid emulator's 2048; a device without the fact sends null. Optional: absent renders null.

    hasCameraPermission?: boolean

    Whether the app holds the camera permission, sent as the timeline's has_camera_permission; absent renders 1.

    hasGoogleAdId?: boolean

    Whether the device has a Google advertising id (device.adid is a Google Play Services value): the Android feed and explore requests carry it as x-google-ad-id, and a device without one sends nothing. Optional: absent means the device has one. A device without Play Services is built without it (hasGoogleAdId: false), so no request carries an id the app would not send.

    hasNotificationPermission?: boolean

    Whether the app may post notifications (Android's notification permission), reported as push/register's os_settings.notificationEnabled. A device fact the library cannot query: the app reports false on a fresh install and true once the permission is granted. Optional: absent renders false — a fresh device has not been granted it.

    id: string
    isFoldable?: boolean

    Device foldable state, sent as x-ig-is-foldable. Optional: absent when the caller does not model the device's fold posture; the Android header layer renders false then. One 448 device is foldable (true); the older 448 devices report false.

    isLayoutRTL: boolean
    keyboardLanguage?: string

    The configured keyboard language (ru-RU), iOS x-ig-device-languages.

    language: string
    lastPushRegistration?: { at: number }

    When this install last registered its main push channel successfully (push/register answered ok), in milliseconds: the app's push_reg_date. A process start with a stored session registers again when it is absent or more than five hours away from the clock. Absent: the install never registered.

    The device's known coarse location, when it has one. AccountSerp sends it as the lat/lng query fields; the typeahead sends none on either app version (450 and 451), so it does not read this. Absent means the device has no known position (no permission or no fix), and then the SERP request carries no coordinates.

    mobileConfig?: MobileConfigStore

    The MobileConfig values the server sent this device in its launcher/mobileconfig answers, for the parameters the library declares (mobile.mobile-config.ts). Absent until an answer is kept: every parameter reads the app's built-in default.

    network?: MobileNetwork

    The network the device is on, the single source of every network-dependent wire value (see MobileNetwork). Absent means the default network, cellular LTE (read it through networkOf): the device generators set it, and snapshots made before the field existed restore without it.

    A device is on a client network, Wi-Fi or cellular LTE. A device may be presented on a network the client state does not model (the emulator's Ethernet NIC); that is not a value of this field, and no builder sends it.

    networkInfo?: AndroidNetworkInfo

    Optional telephony/network profile. Request builders emit it as si_device_param_network_info only when present.

    networkSessionId?: string

    The network-session id (nid=) of the Android x-fb-session-id header the device's network stack last used. It is the session a new process starts from — the nid the earlier process left — and the process replaces it when it opens its own network session (AndroidNetworkSession), so the device only ever holds the current one. Optional: a device that never had a session, or one restored from a snapshot made before the field existed, sends no pair rather than an invented id.

    phoneId: string
    pigeonIdentities?: {
        readonly [key: string]: {
            config?: { hash: string; timestamp: string };
            hmacTtl?: { expiresAt?: string; token: string };
            sampling?: { hash: string; timestamp: string };
        };
    }

    What the app's Pigeon logger keeps of the upload's answers, by the identity the answer was for (PigeonIdentityStatesSchema): the viewer's id, or '' for the anonymous identity. Absent until an answer is kept: an identity the map does not name has been served nothing, and its upload echoes the empty checksum.

    pushHpkeIdentity?: PushHpkeIdentity

    Lazily populated on first Android push registration. See EnsurePushHpkeIdentity.

    pushToken?: string

    The iOS device's APNs push token, which Apple issues and the library cannot obtain. A device fact, not a launch input: the caller supplies it through IosIgpapi.install({ pushToken, … }), or a restored snapshot carries it; absent, iOS registers no push. An Android device registers its own FBNS token from fbnsKey and takes no caller token; on Android the field is only an earlier release's fact — a device restored from a release that registered a caller's token counts as having registered before.

    radioType?: string

    The body radio_type, derived from network (radioTypeOf): a second spelling of the one network fact, kept so a restored device carries it without re-settling. Absent when the network has no body spelling (the Ethernet-only view), and then no builder sends it.

    ramSizeInGb?: number

    The device's memory in gigabytes (fractional, as the app reads it), sent as ram_size_in_gb by the Explore tab's autoplay configuration. A device fact beside deviceStatus; the library models no hardware, so absent renders the parameter empty (ram_size_in_gb=): the request always carries core_count, device_status and ram_size_in_gb (the 451 app sends all three on the tab), and a device that declares no hardware reports them empty, as the other hardware-reporting requests do.

    The routing map the install holds: set when a fetch's answer was accepted (EnterUrlEligibleRmd, the one writer) and by a scenario's device declaration. The map belongs to the install, not to a user session: every account that runs on the device and every later process finds it, a login in a process that holds it keeps it, and absent means the install holds none (a fetch then reports no-valid-map). What a process reports of it is read through rmdReportedOf.

    rmdNoValidMapTimes?: RmdNoValidMapTimes

    The two trailing numbers of the no-valid-map x-fb-rmd value, once this install has reported one (see RmdNoValidMapTimes and rmdNoValidMapTimesOf). Written by KeepRmdNoValidMapTimes when the fetch first reports the no-valid-map state, and by a scenario's device declaration; absent until then, and read through rmdNoValidMapTimesOf.

    systemLanguages?: readonly string[]

    The device's system languages in the user's order (['ru-ID', 'id-ID']), sent by iOS in x-ig-device-languages. Optional: without it the iOS layer sends the system locale alone.

    systemLocale?: string

    The system locale of the device (ru-ID: Russian language, Indonesian region), not the app language (language, ru_RU). iOS sends it as x-ig-device-locale. Optional: without it the iOS header layer renders the app language in that spelling.

    timezoneName?: string

    IANA timezone name (TimeZone.getDefault().getID()), sent as device_timezone_name on feed-surface requests. Optional: absent when the caller does not model a zone name.

    timezoneOffset: string
    usdidIdentity?: UsdidIdentity

    Lazily populated on first USDID-related operation. See EnsureUsdidIdentity.

    uuid: string
    videoEncoders?: {
        readonly [key: string]: readonly {
            bitrate: readonly [number, number];
            complexity: readonly [number, number];
            encoder_name: string;
            frame_rate: readonly [number, number];
            height: readonly [number, number];
            height_alignment: number;
            max_instances: number;
            width: readonly [number, number];
            width_alignment: number;
        }[];
    }

    The video encoders the device's media stack lists, as the app reports them in the upload settings it sends before a video (codec). A device fact, never a build's: it follows the hardware and the OS image. The Android generator reports the descriptor's own release's AOSP software encoders (android.state.ts, one cited file per release); no public source maps a phone model to its vendor encoders, so a generated device claims none, and a caller that knows a real device's list passes it in the snapshot. A declared reference device takes its own list (AndroidDeviceProfile.videoEncoders). Optional: a device that lists none reports an empty codec object.

    zeroAttestationIdentity?: ZeroAttestationIdentity

    The zero-campaign attestation key, once the device has created and uploaded one. Presence is device state: a device that holds a key is a used device, a fresh install holds none. The library never creates or uploads the key, and it does not send x-meta-zca; the key is carried in the snapshot for the work that models the token and its upload.