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

    Interface MobileAccountState

    What the app keeps for one account, in the stores it keys by that account's id (<userId>_USER_PREFERENCES, RoutingHeaderPrefs_<userId>, the Direct tables' user_id): another account signing in on the same install does not see it, and the account finds it again when it comes back.

    interface MobileAccountState {
        contentFilterDictionaryVersions?: Readonly<Record<string, string>>;
        directInboxCache?: {
            threads: readonly {
                is_group: boolean;
                items: readonly {
                    client_context?: string;
                    item_id: string;
                    item_type: string;
                    text?: string;
                    timestamp: string | number;
                    user_id: string;
                }[];
                last_activity_at: string
                | number;
                muted: boolean;
                thread_id: string;
                thread_title: string;
                thread_v2_id: string;
                users: readonly {
                    fbid_v2?: string;
                    full_name: string;
                    pk: string;
                    username: string;
                }[];
            }[];
        };
        directInboxSeqId?: number;
        directLoadedThreads?: readonly string[];
        lastCreationMode?: "post"
        | "reel"
        | "story";
        metaAiConsent?: MetaAiConsentState;
        metaSubsEntrypointSessions?: Readonly<
            Record<
                string,
                { expiresAtMs: number; refreshAtMs: number; sessionId: string },
            >,
        >;
        msgrRegion?: string;
        noteCtasFetchedAtMs?: number;
        popularKeywordsRefreshedAtMs?: number;
        quickPromotionCooldown?: QuickPromotionCooldownRules;
        quickPromotionImpressions?: Readonly<
            Record<string, QuickPromotionSlotImpressions>,
        >;
        regionHint?: string;
        rur?: string;
        shbid?: string;
        shbts?: string;
    }
    Index

    Properties

    contentFilterDictionaryVersions?: Readonly<Record<string, string>>

    The content-filter dictionaries the account holds: dictionary id → the version it downloaded (ContentFilterDictionaryGetQuery's latest_version). A fact of the account, not of the install: the app's dictionary store belongs to the account's own user session, so one account's dictionaries do not follow another account on the same device. The one writer is ContentFilterDictionarySync (packages/mobile/src/content-filter/), after a Get answers a version; a lookup then fetches only the dictionaries whose advertised version differs from the held one of the signed-in account. Absent or empty — a fresh account, or a snapshot of an earlier release, which holds none — the first launch fetches every advertised dictionary once. A session with no account fetches every advertised dictionary and records nothing. Carried by the snapshot.

    directInboxCache?: {
        threads: readonly {
            is_group: boolean;
            items: readonly {
                client_context?: string;
                item_id: string;
                item_type: string;
                text?: string;
                timestamp: string | number;
                user_id: string;
            }[];
            last_activity_at: string
            | number;
            muted: boolean;
            thread_id: string;
            thread_title: string;
            thread_v2_id: string;
            users: readonly {
                fbid_v2?: string;
                full_name: string;
                pk: string;
                username: string;
            }[];
        }[];
    }

    What the app's local Direct inbox store holds for the account that the Direct tab's next requests are built from (see DirectInboxCache): the stored head. The store's rows carry the account they belong to (threads.user_id in the decompiled app's direct.db), so one account's head is never read for another. The one writer is adoptDirectInboxCache.

    directInboxSeqId?: number

    The Direct inbox sequence the server last issued to the account (a Direct answer's seq_id). The app keeps the sequence of each account's own Direct store; one account's sequence is never sent for another. Carried by the snapshot.

    directLoadedThreads?: readonly string[]

    The Direct conversations the account's app holds in its local store: the long thread ids. A conversation the account loaded once (the thread's message list query, a participant lookup or the creation query) opens from the store, sending only its presence subscription and, on a group, its join requests (a group opened for the first time loads its conversation; a thread the account loaded in an earlier process loads nothing). Written by the thread screen after a load (adoptDirectLoadedThread, the one writer); a scenario declares the threads it starts from. Absent: nothing stored. Carried by the snapshot.

    lastCreationMode?: "post" | "reel" | "story"

    The creation mode the account's app was last left in (post, reel or story). The feed's create button opens that mode's screen, and the Reels tab's "+" opens the camera. Absent until a mode was used: the app then opens the post mode. Carried by the snapshot; the only writer is the creation screens' rememberCreationMode, emitted where the app opens or switches to a mode (the Android posting screens).

    metaAiConsent?: MetaAiConsentState

    The Meta AI consent the account's app cached from its last MAIUnifiedUserQuery answer (xfb_gen_ai_unified_nux_consent_status_query, cacheable for the answer's consent_cache_time_s): whether the consent notice is still to be acknowledged, the notice the answer carried, and how long the answer stays cached. The consent is the account's. The search field writes the acknowledgement (MAIUnifiedUserMutation, entrypoint IG__SEARCH__NULLSTATE) at the first keystroke while the notice is still due. Exactly two functions write it, both in packages/android/src/launch/launch.meta-ai-consent.ts: the query's reader (the post-login burst always; the warm launch when the cache is past its time) and the acknowledgement, which marks the notice acknowledged only on an answer without GraphQL errors. Absent: never fetched. Carried by the snapshot.

    metaSubsEntrypointSessions?: Readonly<
        Record<
            string,
            { expiresAtMs: number; refreshAtMs: number; sessionId: string },
        >,
    >

    The Meta Verified (Meta subscriptions) entry-point experience the app caches for the account and per entry point (the lower-case entry point such as mso_ig_edit_profile): entry point → the logging session the experience query served (logging.session_id), which the app echoes in the prefetch of that entry point's tier screen, with the answer's own cache policy as absolute times (it refreshes after refreshAtMs and drops the entry after expiresAtMs). The app stores the cache in the account's own preferences. Absent until the experience query's answer sets it; its one writer is adoptMetaSubsEntrypointSessions.

    msgrRegion?: string

    The Direct message region the app learned from an IGRealtimeRegionHintQuery answer (data.xdt_igd_msg_region.region, e.g. FRC) for this account. The app persists it in the account's own preferences and reports it as x-msgr-region on its Direct-surface requests, in later processes too (the 451 warm launches carry FRC with no query of their own). Absent until an answer sets it; an empty stored value is a region the answer left empty and renders as the empty header on the Direct GraphQL requests only. The one writer is the post-login burst's region-hint step; an answer without a region leaves the account's stored value untouched. See "Direct message region (x-msgr-region)" (packages/core/src/android/spec/direct-message-region-x-msgr-region.md).

    noteCtasFetchedAtMs?: number

    When the Notes call-to-actions (GetNoteCtasRequest) were last fetched from the network for the account. The app's persisted notes_cta_last_fetch_timestamp_ms lives in the account's own preferences. The profile fetches again from the device-local midnight that follows the day of this stamp (or, for an account whose MobileConfig says so, once its interval has passed), and writes it after a successful fetch. Absent: never fetched. Carried by the snapshot (profile.note-ctas.ts names the app's guard).

    popularKeywordsRefreshedAtMs?: number

    When the popular keywords of the search surface were last refreshed from the network for the account: the app's cache time of its popular-keyword repository, which lives in the account's own preferences. The Explore tab refreshes them again once the cache is more than a day old (explore.popular-keywords.ts names the app's guard). Absent: never refreshed. Carried by the snapshot.

    quickPromotionCooldown?: QuickPromotionCooldownRules

    The app's QP cooldown rules (MobileConfig values, not on the wire) that belong to the account. Present only when learned or declared; without them no slot is in cooldown.

    quickPromotionImpressions?: Readonly<
        Record<string, QuickPromotionSlotImpressions>,
    >

    The quick-promotion impressions the account's app counted, per QP slot (QuickPromotionSlot name): slot → the surfaces of the slot with the time each last showed a promotion and the last one. Learned when a promotion is shown and kept per account like the app's <SLOT>_qp_slot_impression_data in the account's preferences. With quickPromotionCooldown it decides whether a slot is in its cooldown (mobile.quick-promotion-history.ts).

    regionHint?: string

    The served Direct region hint (ig-set-ig-u-ig-direct-region-hint) the account's answer carried. Every recorded answer carries it empty — the app's "no change" marker — so a login never overwrites a value the account stored, and the FX accounts-badge probe renders it. Carried by the snapshot.

    rur?: string

    The ig-u-rur routing value an answer of the account's user session set (<region>,<userId>,<time>:<signature>, e.g. NCG,59855288454,…). The app's response handler writes it into the account's routing-header store (RoutingHeaderPrefs_<userId>, X/C03iz.java:61-83 into X/C03jc.java:52-60), so the value names the account it belongs to and a second account never sends the first's. Absent until an answer of the process sets one.

    shbid?: string

    The ig-u-shbid routing value the account's routing-header store holds (X/C03iz.java:65-68 into X/C03jc.java:128-136).

    shbts?: string

    The ig-u-shbts timestamp stored beside shbid (X/C03iz.java:69-72 into X/C03jc.java:138-146).