igpapi — Instagram private API Simulator for Node.js (API reference) 4.19.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<
                    "OnboardingProfileCard",
                    "screen",
                    {},
                    OnboardingProfileCardActions,
                    Record<never, never>,
                    never,
                >;
            } & { raw: ActionRaw },

                | IgApiError
                | HttpRequestError
                | RegistrationChallengeRequiredError
                | RegistrationSpamError
                | RegistrationCreateAccountError
                | ScreenEnterConcurrentError
                | RegistrationStateMissingError
                | RegisteredButLaunchFailedError,
            never,
        >;
        retryLaunch: (
            ...args: [],
        ) => Effect<
            ScreenRootHandle<
                "OnboardingProfileCard",
                "screen",
                {},
                OnboardingProfileCardActions,
                Record<never, never>,
                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<
                "OnboardingProfileCard",
                "screen",
                {},
                OnboardingProfileCardActions,
                Record<never, never>,
                never,
            >;
        } & { raw: ActionRaw },

            | IgApiError
            | HttpRequestError
            | 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 onboarding's profile card), 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<
            "OnboardingProfileCard",
            "screen",
            {},
            OnboardingProfileCardActions,
            Record<never, never>,
            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.