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

    Interface ProfileActions

    What you can do on a user's profile: the methods you call on its handle while the profile is open. Each member says what it does on the screen and what it answers.

    interface ProfileActions {
        follow: <Self extends ScreenHandle>(
            this: Self,
            ...args: [],
        ) => Effect<
            {
                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;
                }[];
                followed: FriendshipChangeResponse;
                raw: ActionRaw;
                suggested: readonly ScreenListItem<
                    {
                        at: "suggested";
                        item: ScreenItemDefinition<
                            "SuggestedUser",
                            {
                                followRankingToken?: string;
                                fullName: string;
                                userId: string;
                                username: string;
                            },
                            {
                                followRankingToken?: string;
                                fullName: string;
                                userId: string;
                                username: string;
                            },
                            SuggestedUserState,
                            never,
                            never,
                            SuggestedUserItemActions,
                            undefined,
                            never,
                            never,
                        >;
                        key: "userId";
                        source: ScreenItemNodes;
                    },
                    Self,
                >[];
            },
            ProfileFollowFailure,
            never,
        >;
        openDirectThread: (
            ...args: [],
        ) => Effect<
            AssembledHandle<
                "DirectThread",
                "screen",
                {
                    media: readonly (
                        | {
                            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 { media_type: 1
                            | 2; pk: string; url: string }[];
                        }
                    )[];
                    messages: 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 {
                                media_type: (...)
                                | (...);
                                pk: string;
                                url: string;
                            }[];
                        };
                        message_ephemeral_lifetime_ms?: string;
                        text?: string;
                        timestamp: string;
                        user_id: string;
                    }[];
                    thread: {
                        is_group: boolean;
                        muted?: boolean;
                        thread_id: string;
                        thread_title: string;
                        thread_v2_id?: string;
                    };
                    users: readonly {
                        fbid_v2?: string;
                        full_name: string;
                        pk: string;
                        username: string;
                    }[];
                },
                DirectThreadActions,
                DirectThreadItems,
                ScreenHandle,
                "required",
                true,
                never,
                AndroidScreens,
            >,
            | IgApiError
            | HttpRequestError
            | ScreenEnterConcurrentError
            | ScreenDataError
            | ScreenEdgeInputError
            | DirectInboxSeqIdUnknownError
            | DirectThreadNotFoundByParticipantsError,
            never,
        >;
        openReelsTab: (
            ...args: [],
        ) => Effect<
            AssembledHandle<
                "UserProfileReelsTab",
                "screen",
                {
                    clips: readonly {
                        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;
                    }[];
                },
                UserProfileReelsTabActions,
                UserProfileReelsTabItems,
                ScreenHandle,
                "required",
                true,
                never,
                AndroidScreens,
            >,
            | IgApiError
            | HttpRequestError
            | SchemaError
            | GraphqlRootFieldMissingError
            | GraphqlServerError
            | ScreenEnterConcurrentError
            | ScreenDataError
            | ScreenEdgeInputError,
            never,
        >;
        openStories: (
            ...args: [],
        ) => Effect<
            AssembledHandle<
                "StoriesViewer",
                "screen",
                { media_id?: string; media_type: number; user_id: string },
                StoriesViewerActions,
                Record<never, never>,
                ScreenHandle,
                "required",
                true,
                "user_id",
                unknown,
            >,
            ScreenEnterConcurrentError | ScreenDataError | ScreenEdgeInputError,
            never,
        >;
        openSuggestedUsers: <Self extends ScreenHandle>(
            this: Self,
            ...args: [],
        ) => Effect<
            {
                raw: ActionRaw;
                suggested: readonly ScreenListItem<
                    {
                        at: "suggested";
                        item: ScreenItemDefinition<
                            "SuggestedUser",
                            {
                                followRankingToken?: string;
                                fullName: string;
                                userId: string;
                                username: string;
                            },
                            {
                                followRankingToken?: string;
                                fullName: string;
                                userId: string;
                                username: string;
                            },
                            SuggestedUserState,
                            never,
                            never,
                            SuggestedUserItemActions,
                            undefined,
                            never,
                            never,
                        >;
                        key: "userId";
                        source: ScreenItemNodes;
                    },
                    Self,
                >[];
            },
            ProfileSuggestedUsersFailure,
            never,
        >;
        scrollGrid: (
            ...args: [],
        ) => Effect<
            ProfileGridPageAnswer & { raw: ActionRaw },
            ProfileScrollGridFailure,
            never,
        >;
        share: (
            ...args: [],
        ) => Effect<
            AssembledHandle<
                "DirectShareSheet",
                "screen",
                {
                    share: | {
                        carousel_share_child_media_id?: string;
                        inventory_source?: string;
                        kind: "post";
                        media_id: string;
                        media_type: number;
                        ranking_info_token?: string;
                        send_attribution: "feed_timeline";
                    }
                    | {
                        carousel_share_child_media_id?: string;
                        kind: "carousel";
                        media_id: string;
                        media_type: number;
                        send_attribution: "feed_contextual_profile";
                    }
                    | { kind: "reel"; media_id: string }
                    | { kind: "profile"; send_attribution: "profile"; user_id: string };
                    threads: readonly {
                        is_group: boolean;
                        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;
                        }[];
                    }[];
                },
                DirectShareSheetActions,
                DirectShareSheetItems,
                ScreenHandle,
                "required",
                true,
                never,
                unknown,
            >,
            ScreenEnterConcurrentError
            | ScreenDataError
            | ScreenEdgeInputError,
            never,
        >;
    }
    Index

    Properties

    follow: <Self extends ScreenHandle>(
        this: Self,
        ...args: [],
    ) => Effect<
        {
            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;
            }[];
            followed: FriendshipChangeResponse;
            raw: ActionRaw;
            suggested: readonly ScreenListItem<
                {
                    at: "suggested";
                    item: ScreenItemDefinition<
                        "SuggestedUser",
                        {
                            followRankingToken?: string;
                            fullName: string;
                            userId: string;
                            username: string;
                        },
                        {
                            followRankingToken?: string;
                            fullName: string;
                            userId: string;
                            username: string;
                        },
                        SuggestedUserState,
                        never,
                        never,
                        SuggestedUserItemActions,
                        undefined,
                        never,
                        never,
                    >;
                    key: "userId";
                    source: ScreenItemNodes;
                },
                Self,
            >[];
        },
        ProfileFollowFailure,
        never,
    >

    Taps Follow: follows the user. The 451 app does not reload the suggested-users rail after a follow, so the answer's suggested is the rail the visit already loaded — the item handles to continue from. A failure that ends the session fails the action.

    openDirectThread: (
        ...args: [],
    ) => Effect<
        AssembledHandle<
            "DirectThread",
            "screen",
            {
                media: readonly (
                    | {
                        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 { media_type: 1
                        | 2; pk: string; url: string }[];
                    }
                )[];
                messages: 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 { media_type: (...)
                        | (...); pk: string; url: string }[];
                    };
                    message_ephemeral_lifetime_ms?: string;
                    text?: string;
                    timestamp: string;
                    user_id: string;
                }[];
                thread: {
                    is_group: boolean;
                    muted?: boolean;
                    thread_id: string;
                    thread_title: string;
                    thread_v2_id?: string;
                };
                users: readonly {
                    fbid_v2?: string;
                    full_name: string;
                    pk: string;
                    username: string;
                }[];
            },
            DirectThreadActions,
            DirectThreadItems,
            ScreenHandle,
            "required",
            true,
            never,
            AndroidScreens,
        >,
        | IgApiError
        | HttpRequestError
        | ScreenEnterConcurrentError
        | ScreenDataError
        | ScreenEdgeInputError
        | DirectInboxSeqIdUnknownError
        | DirectThreadNotFoundByParticipantsError,
        never,
    >

    Taps Message: opens the one-to-one thread with this user. Answers the thread's handle, with this profile below it.

    openReelsTab: (
        ...args: [],
    ) => Effect<
        AssembledHandle<
            "UserProfileReelsTab",
            "screen",
            {
                clips: readonly {
                    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;
                }[];
            },
            UserProfileReelsTabActions,
            UserProfileReelsTabItems,
            ScreenHandle,
            "required",
            true,
            never,
            AndroidScreens,
        >,
        | IgApiError
        | HttpRequestError
        | SchemaError
        | GraphqlRootFieldMissingError
        | GraphqlServerError
        | ScreenEnterConcurrentError
        | ScreenDataError
        | ScreenEdgeInputError,
        never,
    >

    Taps the Reels tab: opens the user's clips. Answers the tab's handle, whose items open the Reels viewer.

    openStories: (
        ...args: [],
    ) => Effect<
        AssembledHandle<
            "StoriesViewer",
            "screen",
            { media_id?: string; media_type: number; user_id: string },
            StoriesViewerActions,
            Record<never, never>,
            ScreenHandle,
            "required",
            true,
            "user_id",
            unknown,
        >,
        ScreenEnterConcurrentError | ScreenDataError | ScreenEdgeInputError,
        never,
    >

    Taps the profile's story ring: opens the stories viewer over the profile on the first story the ring lists. A profile with no story has no ring to tap. Answers the viewer's handle.

    openSuggestedUsers: <Self extends ScreenHandle>(
        this: Self,
        ...args: [],
    ) => Effect<
        {
            raw: ActionRaw;
            suggested: readonly ScreenListItem<
                {
                    at: "suggested";
                    item: ScreenItemDefinition<
                        "SuggestedUser",
                        {
                            followRankingToken?: string;
                            fullName: string;
                            userId: string;
                            username: string;
                        },
                        {
                            followRankingToken?: string;
                            fullName: string;
                            userId: string;
                            username: string;
                        },
                        SuggestedUserState,
                        never,
                        never,
                        SuggestedUserItemActions,
                        undefined,
                        never,
                        never,
                    >;
                    key: "userId";
                    source: ScreenItemNodes;
                },
                Self,
            >[];
        },
        ProfileSuggestedUsersFailure,
        never,
    >

    The profile header's add-person ("suggested users") button: the profile_chaining_button rail as item handles.

    scrollGrid: (
        ...args: [],
    ) => Effect<
        ProfileGridPageAnswer & { raw: ActionRaw },
        ProfileScrollGridFailure,
        never,
    >

    Scrolls the media grid down: loads the page that follows the one the visit showed. Answers the page's tiles, numbered on from the visit's page, and the cursor of the page after it (absent on the last page); a profile whose first page was the last answers no tiles. Only the page after the visit's first is available.

    share: (
        ...args: [],
    ) => Effect<
        AssembledHandle<
            "DirectShareSheet",
            "screen",
            {
                share: | {
                    carousel_share_child_media_id?: string;
                    inventory_source?: string;
                    kind: "post";
                    media_id: string;
                    media_type: number;
                    ranking_info_token?: string;
                    send_attribution: "feed_timeline";
                }
                | {
                    carousel_share_child_media_id?: string;
                    kind: "carousel";
                    media_id: string;
                    media_type: number;
                    send_attribution: "feed_contextual_profile";
                }
                | { kind: "reel"; media_id: string }
                | { kind: "profile"; send_attribution: "profile"; user_id: string };
                threads: readonly {
                    is_group: boolean;
                    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;
                    }[];
                }[];
            },
            DirectShareSheetActions,
            DirectShareSheetItems,
            ScreenHandle,
            "required",
            true,
            never,
            unknown,
        >,
        ScreenEnterConcurrentError
        | ScreenDataError
        | ScreenEdgeInputError,
        never,
    >

    Opens the profile's menu and taps "Share this profile": opens the Direct share sheet on this profile. Nothing is sent until you pick a conversation in the sheet. Answers the sheet's handle.