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

    Interface RegistrationTermsOfServiceActions

    The actions of RegistrationTermsOfServiceScreen: the methods you call on its handle while the screen is open.

    interface RegistrationTermsOfServiceActions {
        agree: (
            ...args: [],
        ) => Effect<
            | {
                _tag: "PartiallyCreated";
                partialAccount: RegistrationPartialAccountState;
                raw: readonly RawAnswer[];
                username: string;
            }
            | { _tag: "ChallengeRequired"; account: RegisteredAccount } & {
                raw: ActionRaw;
            }
            | {
                _tag: "Created";
                account: RegisteredAccount;
                firstScreen: ScreenRootHandle<
                    "FeedTimeline",
                    "tab",
                    {
                        entries: readonly (
                            | {
                                key: string;
                                media: {
                                    carousel_media?: ...;
                                    code: ...;
                                    id: ...;
                                    injected?: ...;
                                    inventory_source?: ...;
                                    logging_info_token?: ...;
                                    media_type: ...;
                                    mezql_token?: ...;
                                    pk?: ...;
                                    product_type?: ...;
                                    ranking_info_token?: ...;
                                    taken_at?: ...;
                                    user?: ...;
                                };
                                position: number;
                                slide?: (...)
                                | (...);
                                type: "post";
                            }
                            | {
                                key: string;
                                media: {
                                    carousel_media?: ...;
                                    code: ...;
                                    id: ...;
                                    injected?: ...;
                                    inventory_source?: ...;
                                    logging_info_token?: ...;
                                    media_type: ...;
                                    mezql_token?: ...;
                                    pk?: ...;
                                    product_type?: ...;
                                    ranking_info_token?: ...;
                                    taken_at?: ...;
                                    user?: ...;
                                };
                                position: number;
                                type: "reel";
                            }
                            | {
                                key: string;
                                media: {
                                    carousel_media?: ...;
                                    code: ...;
                                    id: ...;
                                    injected?: ...;
                                    inventory_source?: ...;
                                    logging_info_token?: ...;
                                    media_type: ...;
                                    mezql_token?: ...;
                                    pk?: ...;
                                    product_type?: ...;
                                    ranking_info_token?: ...;
                                    taken_at?: ...;
                                    user?: ...;
                                };
                                position: number;
                                type: "ad";
                            }
                            | {
                                key: string;
                                media: {
                                    carousel_media?: ...;
                                    code: ...;
                                    id: ...;
                                    injected?: ...;
                                    inventory_source?: ...;
                                    logging_info_token?: ...;
                                    media_type: ...;
                                    mezql_token?: ...;
                                    pk?: ...;
                                    product_type?: ...;
                                    ranking_info_token?: ...;
                                    taken_at?: ...;
                                    user?: ...;
                                };
                                position: number;
                                source: string;
                                type: "explore_story";
                            }
                            | {
                                key: string;
                                position: number;
                                subtitle: string;
                                title: string;
                                type: "caught-up";
                            }
                            | {
                                key: string;
                                position: number;
                                posts: readonly (...)[];
                                title: string;
                                type: "threads";
                            }
                            | {
                                key: string;
                                position: number;
                                reels: readonly (...)[];
                                title: string;
                                type: "suggested-reels";
                            }
                            | {
                                item: { kind: ...; kindKey?: ...; raw: ... };
                                key: string;
                                position: number;
                                type: "unknown";
                            }
                        )[];
                        more_available: boolean;
                        next_max_id?: string;
                        requestId: string;
                    },
                    FeedTimelineActions & Omit<
                        ScreenFeedMembers<
                            {
                                lastTakenAt?: (...)
                                | (...);
                                nextMaxId?: (...) | (...);
                                position?: (...) | (...);
                                reason: TimelineFeedReason;
                                requestId?: (...) | (...);
                            },
                            FeedTimelineItems,
                            | IgApiError
                            | RequestError
                            | ParseError
                            | TransportError
                            | ScreenDataError,
                            | PlainJsonApiHttp
                            | MobileSession
                            | MobileDevice
                            | MobileApplication
                            | NavigationWire
                            | MobileProcessMobileConfig
                            | MobileUserFlows,
                        >,
                        "stream",
                    > & ScreenSwipeMembers<
                        {
                            lastTakenAt?: number;
                            nextMaxId?: string;
                            position?: number;
                            reason: TimelineFeedReason;
                            requestId?: string;
                        },
                        FeedTimelineItems,
                        ScreenFeedSwipeFailure<
                            | IgApiError
                            | RequestError
                            | ParseError
                            | TransportError
                            | ScreenDataError,
                            FeedTimelineItems,
                        >,
                        ScreenFeedPageServices<
                            | PlainJsonApiHttp
                            | MobileSession
                            | MobileDevice
                            | MobileApplication
                            | NavigationWire
                            | MobileProcessMobileConfig
                            | MobileUserFlows,
                            FeedTimelineItems,
                        >,
                    >,
                    ScreenFeedItems<FeedTimelineItems>,
                    never,
                >;
            } & { raw: ActionRaw },

                | IgApiError
                | RequestError
                | ParseError
                | TransportError
                | RegistrationChallengeRequiredError
                | RegistrationSpamError
                | RegistrationCreateAccountError
                | ScreenEnterConcurrentError
                | RegistrationStateMissingError
                | RegisteredButLaunchFailedError,
            never,
        >;
        retryLaunch: (
            ...args: [],
        ) => Effect<
            ScreenRootHandle<
                "FeedTimeline",
                "tab",
                {
                    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;
                },
                FeedTimelineActions & Omit<
                    ScreenFeedMembers<
                        {
                            lastTakenAt?: number;
                            nextMaxId?: string;
                            position?: number;
                            reason: TimelineFeedReason;
                            requestId?: string;
                        },
                        FeedTimelineItems,
                        | IgApiError
                        | RequestError
                        | ParseError
                        | TransportError
                        | ScreenDataError,
                        | PlainJsonApiHttp
                        | MobileSession
                        | MobileDevice
                        | MobileApplication
                        | NavigationWire
                        | MobileProcessMobileConfig
                        | MobileUserFlows,
                    >,
                    "stream",
                > & ScreenSwipeMembers<
                    {
                        lastTakenAt?: number;
                        nextMaxId?: string;
                        position?: number;
                        reason: TimelineFeedReason;
                        requestId?: string;
                    },
                    FeedTimelineItems,
                    ScreenFeedSwipeFailure<
                        | IgApiError
                        | RequestError
                        | ParseError
                        | TransportError
                        | ScreenDataError,
                        FeedTimelineItems,
                    >,
                    ScreenFeedPageServices<
                        | PlainJsonApiHttp
                        | MobileSession
                        | MobileDevice
                        | MobileApplication
                        | NavigationWire
                        | MobileProcessMobileConfig
                        | MobileUserFlows,
                        FeedTimelineItems,
                    >,
                >,
                ScreenFeedItems<FeedTimelineItems>,
                never,
            >,
            ProcessLaunchFailure,
            never,
        >;
    }
    Index

    Properties

    Properties

    agree: (
        ...args: [],
    ) => Effect<
        | {
            _tag: "PartiallyCreated";
            partialAccount: RegistrationPartialAccountState;
            raw: readonly RawAnswer[];
            username: string;
        }
        | { _tag: "ChallengeRequired"; account: RegisteredAccount } & {
            raw: ActionRaw;
        }
        | {
            _tag: "Created";
            account: RegisteredAccount;
            firstScreen: ScreenRootHandle<
                "FeedTimeline",
                "tab",
                {
                    entries: readonly (
                        | {
                            key: string;
                            media: {
                                carousel_media?: ...;
                                code: ...;
                                id: ...;
                                injected?: ...;
                                inventory_source?: ...;
                                logging_info_token?: ...;
                                media_type: ...;
                                mezql_token?: ...;
                                pk?: ...;
                                product_type?: ...;
                                ranking_info_token?: ...;
                                taken_at?: ...;
                                user?: ...;
                            };
                            position: number;
                            slide?: (...)
                            | (...);
                            type: "post";
                        }
                        | {
                            key: string;
                            media: {
                                carousel_media?: ...;
                                code: ...;
                                id: ...;
                                injected?: ...;
                                inventory_source?: ...;
                                logging_info_token?: ...;
                                media_type: ...;
                                mezql_token?: ...;
                                pk?: ...;
                                product_type?: ...;
                                ranking_info_token?: ...;
                                taken_at?: ...;
                                user?: ...;
                            };
                            position: number;
                            type: "reel";
                        }
                        | {
                            key: string;
                            media: {
                                carousel_media?: ...;
                                code: ...;
                                id: ...;
                                injected?: ...;
                                inventory_source?: ...;
                                logging_info_token?: ...;
                                media_type: ...;
                                mezql_token?: ...;
                                pk?: ...;
                                product_type?: ...;
                                ranking_info_token?: ...;
                                taken_at?: ...;
                                user?: ...;
                            };
                            position: number;
                            type: "ad";
                        }
                        | {
                            key: string;
                            media: {
                                carousel_media?: ...;
                                code: ...;
                                id: ...;
                                injected?: ...;
                                inventory_source?: ...;
                                logging_info_token?: ...;
                                media_type: ...;
                                mezql_token?: ...;
                                pk?: ...;
                                product_type?: ...;
                                ranking_info_token?: ...;
                                taken_at?: ...;
                                user?: ...;
                            };
                            position: number;
                            source: string;
                            type: "explore_story";
                        }
                        | {
                            key: string;
                            position: number;
                            subtitle: string;
                            title: string;
                            type: "caught-up";
                        }
                        | {
                            key: string;
                            position: number;
                            posts: readonly (...)[];
                            title: string;
                            type: "threads";
                        }
                        | {
                            key: string;
                            position: number;
                            reels: readonly (...)[];
                            title: string;
                            type: "suggested-reels";
                        }
                        | {
                            item: { kind: ...; kindKey?: ...; raw: ... };
                            key: string;
                            position: number;
                            type: "unknown";
                        }
                    )[];
                    more_available: boolean;
                    next_max_id?: string;
                    requestId: string;
                },
                FeedTimelineActions & Omit<
                    ScreenFeedMembers<
                        {
                            lastTakenAt?: (...)
                            | (...);
                            nextMaxId?: (...) | (...);
                            position?: (...) | (...);
                            reason: TimelineFeedReason;
                            requestId?: (...) | (...);
                        },
                        FeedTimelineItems,
                        | IgApiError
                        | RequestError
                        | ParseError
                        | TransportError
                        | ScreenDataError,
                        | PlainJsonApiHttp
                        | MobileSession
                        | MobileDevice
                        | MobileApplication
                        | NavigationWire
                        | MobileProcessMobileConfig
                        | MobileUserFlows,
                    >,
                    "stream",
                > & ScreenSwipeMembers<
                    {
                        lastTakenAt?: number;
                        nextMaxId?: string;
                        position?: number;
                        reason: TimelineFeedReason;
                        requestId?: string;
                    },
                    FeedTimelineItems,
                    ScreenFeedSwipeFailure<
                        | IgApiError
                        | RequestError
                        | ParseError
                        | TransportError
                        | ScreenDataError,
                        FeedTimelineItems,
                    >,
                    ScreenFeedPageServices<
                        | PlainJsonApiHttp
                        | MobileSession
                        | MobileDevice
                        | MobileApplication
                        | NavigationWire
                        | MobileProcessMobileConfig
                        | MobileUserFlows,
                        FeedTimelineItems,
                    >,
                >,
                ScreenFeedItems<FeedTimelineItems>,
                never,
            >;
        } & { raw: ActionRaw },

            | IgApiError
            | RequestError
            | ParseError
            | TransportError
            | RegistrationChallengeRequiredError
            | RegistrationSpamError
            | RegistrationCreateAccountError
            | ScreenEnterConcurrentError
            | RegistrationStateMissingError
            | RegisteredButLaunchFailedError,
        never,
    >

    Taps I agree: creates the account and answers the server's decision — Created with the created account and the screen the launch leaves on top (the feed), ChallengeRequired with the created account and no launch (the challenge is its own flow), or PartiallyCreated when the server gave nothing to complete the account with. A launch failure after the account exists is RegisteredButLaunchFailedError, which keeps the created account; the screen stays on top for retryLaunch(). Calling it twice sends two creations.

    retryLaunch: (
        ...args: [],
    ) => Effect<
        ScreenRootHandle<
            "FeedTimeline",
            "tab",
            {
                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;
            },
            FeedTimelineActions & Omit<
                ScreenFeedMembers<
                    {
                        lastTakenAt?: number;
                        nextMaxId?: string;
                        position?: number;
                        reason: TimelineFeedReason;
                        requestId?: string;
                    },
                    FeedTimelineItems,
                    | IgApiError
                    | RequestError
                    | ParseError
                    | TransportError
                    | ScreenDataError,
                    | PlainJsonApiHttp
                    | MobileSession
                    | MobileDevice
                    | MobileApplication
                    | NavigationWire
                    | MobileProcessMobileConfig
                    | MobileUserFlows,
                >,
                "stream",
            > & ScreenSwipeMembers<
                {
                    lastTakenAt?: number;
                    nextMaxId?: string;
                    position?: number;
                    reason: TimelineFeedReason;
                    requestId?: string;
                },
                FeedTimelineItems,
                ScreenFeedSwipeFailure<
                    | IgApiError
                    | RequestError
                    | ParseError
                    | TransportError
                    | ScreenDataError,
                    FeedTimelineItems,
                >,
                ScreenFeedPageServices<
                    | PlainJsonApiHttp
                    | MobileSession
                    | MobileDevice
                    | MobileApplication
                    | NavigationWire
                    | MobileProcessMobileConfig
                    | MobileUserFlows,
                    FeedTimelineItems,
                >,
            >,
            ScreenFeedItems<FeedTimelineItems>,
            never,
        >,
        ProcessLaunchFailure,
        never,
    >

    Runs the launch again after agree() answered RegisteredButLaunchFailedError (the same action works on a restored checkpoint of that screen). It sends no registration request and answers the launch's first screen, or the launch's own error.