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

    Function clientInternalsOf

    • createClientInternals as an Effect, with the failure split the app layers expose: a snapshot that cannot be restored fails with SnapshotDecodeError; invalid options and everything else are defects.

      Parameters

      Returns Effect<
          {
              application: MobileApplicationState;
              client: Client;
              cookieJar: CookieJarLike;
              device: MobileDeviceState;
              protocolDiagnostics: () => readonly Readonly<ProtocolDiagnostic>[];
              requestTimeoutMs: number;
              session: {
                  accounts: {
                      readonly [key: string]: {
                          contentFilterDictionaryVersions?: { readonly [key: string]: string };
                          directInboxCache?: {
                              threads: readonly {
                                  is_group: boolean;
                                  items: readonly {
                                      client_context?: ...;
                                      item_id: ...;
                                      item_type: ...;
                                      text?: ...;
                                      timestamp: ...;
                                      user_id: ...;
                                  }[];
                                  last_activity_at: string
                                  | number;
                                  muted: boolean;
                                  thread_id: string;
                                  thread_title: string;
                                  thread_v2_id: string;
                                  users: readonly {
                                      fbid_v2?: ...;
                                      full_name: ...;
                                      pk: ...;
                                      username: ...;
                                  }[];
                              }[];
                          };
                          directInboxSeqId?: number;
                          directLoadedThreads?: readonly string[];
                          lastCreationMode?: "post"
                          | "reel"
                          | "story";
                          metaAiConsent?: {
                              cacheTimeSeconds: number;
                              fetchedAtSeconds: number;
                              nuxType: string;
                              requiresNux: boolean;
                              text: string;
                              version: string;
                          };
                          metaSubsEntrypointSessions?: {
                              readonly [key: string]: {
                                  expiresAtMs: number;
                                  refreshAtMs: number;
                                  sessionId: string;
                              };
                          };
                          msgrRegion?: string;
                          noteCtasFetchedAtMs?: number;
                          popularKeywordsRefreshedAtMs?: number;
                          quickPromotionCooldown?: {
                              defaultMs: number;
                              slots: { readonly [key: string]: number };
                          };
                          quickPromotionImpressions?: {
                              readonly [key: string]: {
                                  lastSurface: string;
                                  surfaces: { readonly [key: string]: number };
                              };
                          };
                          regionHint?: string;
                          rur?: string;
                          shbid?: string;
                          shbts?: string;
                      };
                  };
                  appStartPhase?: "cold";
                  appStartTimeMs?: number;
                  authorization?: string;
                  bandwidth?: {
                      bytes: number;
                      carried?: true;
                      ms: number;
                      stack?: {
                          downloadBwAvgBps: number;
                          downloadBweMeanBps: number;
                          downloadBwStddevBps: number;
                          rttAvgMs: number;
                          rttStddevMs: number;
                          uploadBwAvgBps: number;
                          uploadBwe: {
                              bps: number;
                              buckets: readonly {
                                  lower: number;
                                  mean: number;
                                  p25: number;
                                  p50: number;
                                  p75: number;
                                  samples: number;
                                  upper: (...)
                                  | (...);
                              }[];
                              sampleCount: number;
                          };
                          uploadBwStddevBps: number;
                      };
                  };
                  challenge?: { readonly [key: string]: unknown };
                  checkpoint?: { readonly [key: string]: unknown };
                  clientSessionIdLifetime: number;
                  dsUserId?: string;
                  familyDeviceIdBound?: boolean;
                  fbidV2?: string;
                  igWWWClaim?: string;
                  passwordEncryptionKeyId?: string;
                  passwordEncryptionPubKey?: string;
                  pigeonSessionIdLifetime: number;
                  profileFollows?: {
                      readonly [key: string]: {
                          atMs: number;
                          following: boolean;
                          outgoingRequest: boolean;
                      };
                  };
                  profileInfoFetches?: {
                      readonly [key: string]: {
                          atMs: number;
                          userFbid?: string;
                          username: string;
                      };
                  };
                  rmdEvaluationStarted?: boolean;
                  sessionStartPhase?: "starting";
                  thumbnailCacheBustingValue: number;
                  xMetaUsdid?: string;
                  xMid?: string;
                  zeroInterface?: boolean;
                  zeroPhase?: "logged-out"
                  | "authenticated"
                  | "rmd-evaluated";
              };
              startedWithSession: boolean;
          },
          SnapshotDecodeError,
          never,
      >