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

    Interface FeedTimelineActions

    The feed's tab bar: the three tabs of the app, each landing on its tab's root, and the create button.

    interface FeedTimelineActions {
        openCreation: FeedCreationCall;
        openDirectTab: (
            ...args: [],
        ) => Effect<
            AssembledHandle<
                "DirectInbox",
                "tab",
                {
                    threads: readonly {
                        is_group: boolean;
                        last_activity_at: string;
                        muted: boolean;
                        preview: readonly {
                            client_context?: string;
                            command_count?: number;
                            edit_count?: number;
                            item_id: string;
                            item_type: string;
                            media?: | {
                                height: number;
                                media_type: 1;
                                pk: string;
                                url: string;
                                width: number;
                            }
                            | {
                                height: number;
                                media_type: 2;
                                pk: string;
                                url: string;
                                width: number;
                            }
                            | { media_type: 8; pk: string; slides: readonly (...)[] };
                            message_ephemeral_lifetime_ms?: string;
                            text?: string;
                            timestamp: string;
                            user_id: string;
                        }[];
                        thread_id: string;
                        thread_title: string;
                        thread_v2_id: string;
                        users: readonly {
                            fbid_v2?: string;
                            full_name: string;
                            pk: string;
                            username: string;
                        }[];
                    }[];
                },
                DirectInboxActions,
                DirectInboxItems,
                ScreenHandle
                | undefined,
                "optional",
                false,
                never,
                unknown,
            >,

                | IgApiError
                | HttpRequestError
                | SchemaError
                | ScreenEnterConcurrentError
                | ScreenDataError
                | ScreenEdgeInputError,
            never,
        >;
        openFollowing: (
            ...args: [],
        ) => Effect<
            AssembledHandle<
                "FeedTimelineFollowing",
                "screen",
                {
                    entries: readonly (
                        | {
                            key: string;
                            media: {
                                carousel_media?: readonly { pk: ... }[];
                                code: string;
                                id: string;
                                injected?: { ad_id?: (...) | (...) } | null;
                                inventory_source?: string;
                                logging_info_token?: string;
                                media_type: number;
                                mezql_token?: string;
                                pk?: string;
                                product_type?: string;
                                ranking_info_token?: string;
                                taken_at?: number;
                                user?: { pk: string; username: string };
                            };
                            position: number;
                            slide?: number;
                            type: "post";
                        }
                        | {
                            key: string;
                            media: {
                                carousel_media?: readonly { pk: ... }[];
                                code: string;
                                id: string;
                                injected?: { ad_id?: (...) | (...) } | null;
                                inventory_source?: string;
                                logging_info_token?: string;
                                media_type: number;
                                mezql_token?: string;
                                pk?: string;
                                product_type?: string;
                                ranking_info_token?: string;
                                taken_at?: number;
                                user?: { pk: string; username: string };
                            };
                            position: number;
                            type: "reel";
                        }
                        | {
                            key: string;
                            media: {
                                carousel_media?: readonly { pk: ... }[];
                                code: string;
                                id: string;
                                injected?: { ad_id?: (...) | (...) } | null;
                                inventory_source?: string;
                                logging_info_token?: string;
                                media_type: number;
                                mezql_token?: string;
                                pk?: string;
                                product_type?: string;
                                ranking_info_token?: string;
                                taken_at?: number;
                                user?: { pk: string; username: string };
                            };
                            position: number;
                            type: "ad";
                        }
                        | {
                            key: string;
                            media: {
                                carousel_media?: readonly { pk: ... }[];
                                code: string;
                                id: string;
                                injected?: { ad_id?: (...) | (...) } | null;
                                inventory_source?: string;
                                logging_info_token?: string;
                                media_type: number;
                                mezql_token?: string;
                                pk?: string;
                                product_type?: string;
                                ranking_info_token?: string;
                                taken_at?: number;
                                user?: { pk: string; username: string };
                            };
                            position: number;
                            source: string;
                            type: "explore_story";
                        }
                        | {
                            key: string;
                            position: number;
                            subtitle: string;
                            title: string;
                            type: "caught-up";
                        }
                        | {
                            key: string;
                            position: number;
                            posts: readonly {
                                id?: string;
                                media_type?: number;
                                user?: { pk: ...; username: ... };
                            }[];
                            title: string;
                            type: "threads";
                        }
                        | {
                            key: string;
                            position: number;
                            reels: readonly {
                                id?: string;
                                is_eof?: boolean
                                | null;
                                media_type?: number;
                                pk?: string;
                                user?: { pk: ...; username: ... };
                            }[];
                            title: string;
                            type: "suggested-reels";
                        }
                        | {
                            item: { kind: "unknown"; kindKey?: string; raw: Json };
                            key: string;
                            position: number;
                            type: "unknown";
                        }
                    )[];
                    more_available: boolean;
                    next_max_id?: string;
                    requestId: string;
                },
                FeedTimelineFollowingActions & Omit<
                    ScreenFeedMembers<
                        {
                            lastTakenAt?: number;
                            nextMaxId?: string;
                            position?: number;
                            reason: TimelineFeedReason;
                            requestId?: string;
                        },
                        FeedTimelineItems,
                        IgApiError
                        | HttpRequestError
                        | ScreenDataError,

                            | MobileSession
                            | MobileDevice
                            | MobileTelemetry
                            | MobileApplication
                            | NavigationWire
                            | JsonResponseHttp
                            | MobileNetworkWire
                            | MobileProcessMobileConfig
                            | MobileUserFlows,
                    >,
                    "stream",
                > & ScreenSwipeMembers<
                    {
                        lastTakenAt?: number;
                        nextMaxId?: string;
                        position?: number;
                        reason: TimelineFeedReason;
                        requestId?: string;
                    },
                    FeedTimelineItems,
                    ScreenFeedSwipeFailure<
                        IgApiError
                        | HttpRequestError
                        | ScreenDataError,
                        FeedTimelineItems,
                    >,
                    ScreenFeedPageServices<
                        | MobileSession
                        | MobileDevice
                        | MobileTelemetry
                        | MobileApplication
                        | NavigationWire
                        | JsonResponseHttp
                        | MobileNetworkWire
                        | MobileProcessMobileConfig
                        | MobileUserFlows,
                        FeedTimelineItems,
                    >,
                >,
                ScreenFeedItems<FeedTimelineItems>,
                ScreenHandle,
                "required",
                true,
                never,
                unknown,
            >,

                | IgApiError
                | HttpRequestError
                | ScreenEnterConcurrentError
                | ScreenDataError
                | ScreenEdgeInputError,
            never,
        >;
        openMyProfileTab: (
            ...args: [],
        ) => Effect<
            AssembledHandle<
                "MyProfile",
                "tab",
                {
                    backgroundFailures: readonly {
                        message?: string;
                        request: | "story"
                        | "chaining"
                        | "recentSearchClick"
                        | "friendship"
                        | "highlights"
                        | "avatar"
                        | "inboxTray"
                        | "schoolBadge"
                        | "quickPromotion"
                        | "noteCtas"
                        | "selfProfileChaining"
                        | "creatorsTrial"
                        | "onboardingChecklist"
                        | "creatorDestinationType"
                        | "paymentsAccountDisabledRisk"
                        | "fbPayExperience"
                        | "donationsEligibility"
                        | "metaOneBenefitEligibility"
                        | "ringCreatorMetadata"
                        | "proHomeBadge"
                        | "proDashboard"
                        | "activityCount";
                        tag: string;
                    }[];
                    metaVerifiedOffers: {
                        enhancedProfile: boolean;
                        shareableLinks: boolean;
                    };
                    userId: string;
                },
                MyProfileActions,
                Record<never, never>,
                ScreenHandle | undefined,
                "optional",
                false,
                "userId",
                unknown,
            >,

                | ScreenEnterConcurrentError
                | ScreenDataError
                | ScreenEdgeInputError
                | MyProfileEnterError,
            never,
        >;
        openReelsTab: (
            ...args: [],
        ) => Effect<
            AssembledHandle<
                "ReelsViewer",
                "tab",
                {
                    entries: readonly {
                        delivery?: "tail"
                        | "head";
                        key: string;
                        media: {
                            clips_metadata?: { music_info?: {} | null };
                            code: string;
                            id: string;
                            inventory_source?: string;
                            logging_info_token?: string;
                            media_type: number;
                            organic_tracking_token?: string;
                            pk: string;
                            taken_at?: number;
                            user?: {
                                friendship_status?: { following?: ... } | null;
                                id?: string;
                                pk?: string;
                            };
                            video_duration?: number;
                        };
                        position: number;
                    }[];
                    next?: { maxId: string; offset?: number };
                    opensOnOneReel?: boolean;
                },
                ReelsViewerActions & Omit<
                    ScreenFeedMembers<
                        {
                            initial?: {
                                clips_metadata?: { music_info?: ... };
                                code: string;
                                id: string;
                                inventory_source?: string;
                                logging_info_token?: string;
                                media_type: number;
                                organic_tracking_token?: string;
                                pk: string;
                                taken_at?: number;
                                user?: { friendship_status?: ...; id?: ...; pk?: ... };
                                video_duration?: number;
                            };
                            maxId?: string;
                            offset?: number;
                        },
                        ReelsViewerItems,
                        IgApiError
                        | HttpRequestError
                        | ScreenDataError,

                            | PlainJsonApiHttp
                            | MobileSession
                            | MobileDevice
                            | MobileTelemetry
                            | GraphqlJsonHttp
                            | MobileApplication
                            | NavigationWire
                            | AndroidClientAddress
                            | MobileNetworkWire
                            | MobileProcessBackground,
                    >,
                    "stream",
                > & ScreenSwipeMembers<
                    {
                        initial?: {
                            clips_metadata?: { music_info?: (...)
                            | (...)
                            | (...) };
                            code: string;
                            id: string;
                            inventory_source?: string;
                            logging_info_token?: string;
                            media_type: number;
                            organic_tracking_token?: string;
                            pk: string;
                            taken_at?: number;
                            user?: {
                                friendship_status?: (...) | (...) | (...);
                                id?: (...) | (...);
                                pk?: (...) | (...);
                            };
                            video_duration?: number;
                        };
                        maxId?: string;
                        offset?: number;
                    },
                    ReelsViewerItems,
                    ScreenFeedSwipeFailure<
                        IgApiError
                        | HttpRequestError
                        | ScreenDataError,
                        ReelsViewerItems,
                    >,
                    ScreenFeedPageServices<
                        | PlainJsonApiHttp
                        | MobileSession
                        | MobileDevice
                        | MobileTelemetry
                        | GraphqlJsonHttp
                        | MobileApplication
                        | NavigationWire
                        | AndroidClientAddress
                        | MobileNetworkWire
                        | MobileProcessBackground,
                        ReelsViewerItems,
                    >,
                >,
                ScreenFeedItems<ReelsViewerItems>,
                ScreenHandle | undefined,
                "optional",
                false,
                never,
                unknown,
            >,

                | IgApiError
                | HttpRequestError
                | ScreenEnterConcurrentError
                | ScreenDataError
                | ScreenEdgeInputError,
            never,
        >;
        openSearchTab: (
            ...args: [],
        ) => Effect<
            AssembledHandle<
                "Explore",
                "tab",
                {
                    recent: readonly {
                        fullName?: string;
                        rowKey: string;
                        userId?: string;
                        username?: string;
                    }[];
                },
                ExploreActions,
                Record<never, never>,
                ScreenHandle | undefined,
                "optional",
                false,
                never,
                unknown,
            >,

                | IgApiError
                | HttpRequestError
                | ScreenEnterConcurrentError
                | ScreenDataError
                | ScreenEdgeInputError,
            never,
        >;
    }
    Index

    Properties

    openCreation: FeedCreationCall

    Taps the bottom bar's create button in the mode you ask for: openCreation('post' | 'story' | 'reel') answers that mode's first screen, the post gallery picker, the story camera or the Reel gallery. The app opens the creation in the mode it was last left in (post by default); when that differs from the mode you ask for and is post, the picker's mode selector moves it, as a tap would. A move out of story or Reel is not offered and fails with PostingCreationModeNotRecordedError. The creation flow is pushed over the feed, which stays below it.

    openDirectTab: (
        ...args: [],
    ) => Effect<
        AssembledHandle<
            "DirectInbox",
            "tab",
            {
                threads: readonly {
                    is_group: boolean;
                    last_activity_at: string;
                    muted: boolean;
                    preview: readonly {
                        client_context?: string;
                        command_count?: number;
                        edit_count?: number;
                        item_id: string;
                        item_type: string;
                        media?: | {
                            height: number;
                            media_type: 1;
                            pk: string;
                            url: string;
                            width: number;
                        }
                        | {
                            height: number;
                            media_type: 2;
                            pk: string;
                            url: string;
                            width: number;
                        }
                        | { media_type: 8; pk: string; slides: readonly (...)[] };
                        message_ephemeral_lifetime_ms?: string;
                        text?: string;
                        timestamp: string;
                        user_id: string;
                    }[];
                    thread_id: string;
                    thread_title: string;
                    thread_v2_id: string;
                    users: readonly {
                        fbid_v2?: string;
                        full_name: string;
                        pk: string;
                        username: string;
                    }[];
                }[];
            },
            DirectInboxActions,
            DirectInboxItems,
            ScreenHandle
            | undefined,
            "optional",
            false,
            never,
            unknown,
        >,

            | IgApiError
            | HttpRequestError
            | SchemaError
            | ScreenEnterConcurrentError
            | ScreenDataError
            | ScreenEdgeInputError,
        never,
    >

    Taps the paper-plane icon on the bottom bar and lands on the Direct inbox, the tab's root. Answers its handle.

    openFollowing: (
        ...args: [],
    ) => Effect<
        AssembledHandle<
            "FeedTimelineFollowing",
            "screen",
            {
                entries: readonly (
                    | {
                        key: string;
                        media: {
                            carousel_media?: readonly { pk: ... }[];
                            code: string;
                            id: string;
                            injected?: { ad_id?: (...) | (...) } | null;
                            inventory_source?: string;
                            logging_info_token?: string;
                            media_type: number;
                            mezql_token?: string;
                            pk?: string;
                            product_type?: string;
                            ranking_info_token?: string;
                            taken_at?: number;
                            user?: { pk: string; username: string };
                        };
                        position: number;
                        slide?: number;
                        type: "post";
                    }
                    | {
                        key: string;
                        media: {
                            carousel_media?: readonly { pk: ... }[];
                            code: string;
                            id: string;
                            injected?: { ad_id?: (...) | (...) } | null;
                            inventory_source?: string;
                            logging_info_token?: string;
                            media_type: number;
                            mezql_token?: string;
                            pk?: string;
                            product_type?: string;
                            ranking_info_token?: string;
                            taken_at?: number;
                            user?: { pk: string; username: string };
                        };
                        position: number;
                        type: "reel";
                    }
                    | {
                        key: string;
                        media: {
                            carousel_media?: readonly { pk: ... }[];
                            code: string;
                            id: string;
                            injected?: { ad_id?: (...) | (...) } | null;
                            inventory_source?: string;
                            logging_info_token?: string;
                            media_type: number;
                            mezql_token?: string;
                            pk?: string;
                            product_type?: string;
                            ranking_info_token?: string;
                            taken_at?: number;
                            user?: { pk: string; username: string };
                        };
                        position: number;
                        type: "ad";
                    }
                    | {
                        key: string;
                        media: {
                            carousel_media?: readonly { pk: ... }[];
                            code: string;
                            id: string;
                            injected?: { ad_id?: (...) | (...) } | null;
                            inventory_source?: string;
                            logging_info_token?: string;
                            media_type: number;
                            mezql_token?: string;
                            pk?: string;
                            product_type?: string;
                            ranking_info_token?: string;
                            taken_at?: number;
                            user?: { pk: string; username: string };
                        };
                        position: number;
                        source: string;
                        type: "explore_story";
                    }
                    | {
                        key: string;
                        position: number;
                        subtitle: string;
                        title: string;
                        type: "caught-up";
                    }
                    | {
                        key: string;
                        position: number;
                        posts: readonly {
                            id?: string;
                            media_type?: number;
                            user?: { pk: ...; username: ... };
                        }[];
                        title: string;
                        type: "threads";
                    }
                    | {
                        key: string;
                        position: number;
                        reels: readonly {
                            id?: string;
                            is_eof?: boolean
                            | null;
                            media_type?: number;
                            pk?: string;
                            user?: { pk: ...; username: ... };
                        }[];
                        title: string;
                        type: "suggested-reels";
                    }
                    | {
                        item: { kind: "unknown"; kindKey?: string; raw: Json };
                        key: string;
                        position: number;
                        type: "unknown";
                    }
                )[];
                more_available: boolean;
                next_max_id?: string;
                requestId: string;
            },
            FeedTimelineFollowingActions & Omit<
                ScreenFeedMembers<
                    {
                        lastTakenAt?: number;
                        nextMaxId?: string;
                        position?: number;
                        reason: TimelineFeedReason;
                        requestId?: string;
                    },
                    FeedTimelineItems,
                    IgApiError
                    | HttpRequestError
                    | ScreenDataError,

                        | MobileSession
                        | MobileDevice
                        | MobileTelemetry
                        | MobileApplication
                        | NavigationWire
                        | JsonResponseHttp
                        | MobileNetworkWire
                        | MobileProcessMobileConfig
                        | MobileUserFlows,
                >,
                "stream",
            > & ScreenSwipeMembers<
                {
                    lastTakenAt?: number;
                    nextMaxId?: string;
                    position?: number;
                    reason: TimelineFeedReason;
                    requestId?: string;
                },
                FeedTimelineItems,
                ScreenFeedSwipeFailure<
                    IgApiError
                    | HttpRequestError
                    | ScreenDataError,
                    FeedTimelineItems,
                >,
                ScreenFeedPageServices<
                    | MobileSession
                    | MobileDevice
                    | MobileTelemetry
                    | MobileApplication
                    | NavigationWire
                    | JsonResponseHttp
                    | MobileNetworkWire
                    | MobileProcessMobileConfig
                    | MobileUserFlows,
                    FeedTimelineItems,
                >,
            >,
            ScreenFeedItems<FeedTimelineItems>,
            ScreenHandle,
            "required",
            true,
            never,
            unknown,
        >,

            | IgApiError
            | HttpRequestError
            | ScreenEnterConcurrentError
            | ScreenDataError
            | ScreenEdgeInputError,
        never,
    >

    Taps the title dropdown's Following filter: the feed of the accounts you follow. Answers its handle.

    openMyProfileTab: (
        ...args: [],
    ) => Effect<
        AssembledHandle<
            "MyProfile",
            "tab",
            {
                backgroundFailures: readonly {
                    message?: string;
                    request: | "story"
                    | "chaining"
                    | "recentSearchClick"
                    | "friendship"
                    | "highlights"
                    | "avatar"
                    | "inboxTray"
                    | "schoolBadge"
                    | "quickPromotion"
                    | "noteCtas"
                    | "selfProfileChaining"
                    | "creatorsTrial"
                    | "onboardingChecklist"
                    | "creatorDestinationType"
                    | "paymentsAccountDisabledRisk"
                    | "fbPayExperience"
                    | "donationsEligibility"
                    | "metaOneBenefitEligibility"
                    | "ringCreatorMetadata"
                    | "proHomeBadge"
                    | "proDashboard"
                    | "activityCount";
                    tag: string;
                }[];
                metaVerifiedOffers: { enhancedProfile: boolean; shareableLinks: boolean };
                userId: string;
            },
            MyProfileActions,
            Record<never, never>,
            ScreenHandle | undefined,
            "optional",
            false,
            "userId",
            unknown,
        >,

            | ScreenEnterConcurrentError
            | ScreenDataError
            | ScreenEdgeInputError
            | MyProfileEnterError,
        never,
    >

    Taps the Profile tab on the bottom bar and lands on your own profile's root. Answers its handle.

    openReelsTab: (
        ...args: [],
    ) => Effect<
        AssembledHandle<
            "ReelsViewer",
            "tab",
            {
                entries: readonly {
                    delivery?: "tail"
                    | "head";
                    key: string;
                    media: {
                        clips_metadata?: { music_info?: {} | null };
                        code: string;
                        id: string;
                        inventory_source?: string;
                        logging_info_token?: string;
                        media_type: number;
                        organic_tracking_token?: string;
                        pk: string;
                        taken_at?: number;
                        user?: {
                            friendship_status?: { following?: ... } | null;
                            id?: string;
                            pk?: string;
                        };
                        video_duration?: number;
                    };
                    position: number;
                }[];
                next?: { maxId: string; offset?: number };
                opensOnOneReel?: boolean;
            },
            ReelsViewerActions & Omit<
                ScreenFeedMembers<
                    {
                        initial?: {
                            clips_metadata?: { music_info?: ... };
                            code: string;
                            id: string;
                            inventory_source?: string;
                            logging_info_token?: string;
                            media_type: number;
                            organic_tracking_token?: string;
                            pk: string;
                            taken_at?: number;
                            user?: { friendship_status?: ...; id?: ...; pk?: ... };
                            video_duration?: number;
                        };
                        maxId?: string;
                        offset?: number;
                    },
                    ReelsViewerItems,
                    IgApiError
                    | HttpRequestError
                    | ScreenDataError,

                        | PlainJsonApiHttp
                        | MobileSession
                        | MobileDevice
                        | MobileTelemetry
                        | GraphqlJsonHttp
                        | MobileApplication
                        | NavigationWire
                        | AndroidClientAddress
                        | MobileNetworkWire
                        | MobileProcessBackground,
                >,
                "stream",
            > & ScreenSwipeMembers<
                {
                    initial?: {
                        clips_metadata?: { music_info?: (...)
                        | (...)
                        | (...) };
                        code: string;
                        id: string;
                        inventory_source?: string;
                        logging_info_token?: string;
                        media_type: number;
                        organic_tracking_token?: string;
                        pk: string;
                        taken_at?: number;
                        user?: {
                            friendship_status?: (...) | (...) | (...);
                            id?: (...) | (...);
                            pk?: (...) | (...);
                        };
                        video_duration?: number;
                    };
                    maxId?: string;
                    offset?: number;
                },
                ReelsViewerItems,
                ScreenFeedSwipeFailure<
                    IgApiError
                    | HttpRequestError
                    | ScreenDataError,
                    ReelsViewerItems,
                >,
                ScreenFeedPageServices<
                    | PlainJsonApiHttp
                    | MobileSession
                    | MobileDevice
                    | MobileTelemetry
                    | GraphqlJsonHttp
                    | MobileApplication
                    | NavigationWire
                    | AndroidClientAddress
                    | MobileNetworkWire
                    | MobileProcessBackground,
                    ReelsViewerItems,
                >,
            >,
            ScreenFeedItems<ReelsViewerItems>,
            ScreenHandle | undefined,
            "optional",
            false,
            never,
            unknown,
        >,

            | IgApiError
            | HttpRequestError
            | ScreenEnterConcurrentError
            | ScreenDataError
            | ScreenEdgeInputError,
        never,
    >

    Taps the Reels tab on the bottom bar and lands on the Reels viewer, which asks for the stream's first page itself. Answers its handle.

    openSearchTab: (
        ...args: [],
    ) => Effect<
        AssembledHandle<
            "Explore",
            "tab",
            {
                recent: readonly {
                    fullName?: string;
                    rowKey: string;
                    userId?: string;
                    username?: string;
                }[];
            },
            ExploreActions,
            Record<never, never>,
            ScreenHandle | undefined,
            "optional",
            false,
            never,
            unknown,
        >,

            | IgApiError
            | HttpRequestError
            | ScreenEnterConcurrentError
            | ScreenDataError
            | ScreenEdgeInputError,
        never,
    >

    Taps the Search tab on the bottom bar and lands on the Explore screen's root. Answers its handle.