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

    Function reelsViewerChainingOf

    • Internal

      The viewer's resolved chaining session, from the input it opened with: the declared values plus what the viewer itself derives.

      The two session ids are the app's own: the input keeps the ones its caller declares, and the ones it lacks the viewer mints once, when it opens (its enter, the effectful owner of the moment, like the sheet's composer session id) — never here, because a restore re-runs this function and would mint a second session. The minted session lives in the viewer's process state (ReelsViewerViews), which the checkpoint carries, so a restored viewer's like and comment name the session it opened with; the ids are never null where the app sends one (android-451/reels-comment 123 and reels-like 125 carry a uuid). The single-reel entry keeps every other declared value as it comes — the 450 app declares the whole session there. The list entry's seed is the tapped reel's container id (the comment's form; the like names its pk) and its positions are the reel's index in the list, derived by the reel that acts, not declared by the caller.

      Parameters

      • input:
            | {
                chaining?: {
                    chainingSessionId?: string;
                    mediaPctWatched?: string
                    | number;
                    rankingSessionId?: string;
                };
                index: number;
                reels: readonly {
                    code: string;
                    id: string;
                    media_type: number;
                    organic_tracking_token?: string;
                    pk: string;
                    taken_at?: number;
                    user?: { id?: string; pk?: string };
                    video_duration?: number;
                }[];
            }
            | {
                chainingPosition?: string
                | number;
                chainingSeedMediaId?: string;
                chainingSessionId?: string;
                clientPosition?: string | number;
                friendsLane?: false;
                media?: {
                    code: string;
                    id: string;
                    media_type: number;
                    organic_tracking_token?: string;
                    pk: string;
                    taken_at?: number;
                    user?: { id?: string; pk?: string };
                    video_duration?: number;
                };
                mediaPctWatched?: string
                | number;
                rankingSessionId?: string;
                storyRankingToken?: string;
            }
        • {
              chaining?: {
                  chainingSessionId?: string;
                  mediaPctWatched?: string | number;
                  rankingSessionId?: string;
              };
              index: number;
              reels: readonly {
                  code: string;
                  id: string;
                  media_type: number;
                  organic_tracking_token?: string;
                  pk: string;
                  taken_at?: number;
                  user?: { id?: string; pk?: string };
                  video_duration?: number;
              }[];
          }
        • {
              chainingPosition?: string | number;
              chainingSeedMediaId?: string;
              chainingSessionId?: string;
              clientPosition?: string | number;
              friendsLane?: false;
              media?: {
                  code: string;
                  id: string;
                  media_type: number;
                  organic_tracking_token?: string;
                  pk: string;
                  taken_at?: number;
                  user?: { id?: string; pk?: string };
                  video_duration?: number;
              };
              mediaPctWatched?: string
              | number;
              rankingSessionId?: string;
              storyRankingToken?: string;
          }
          • Optional ReadonlychainingPosition?: string | number

            Zero-based position in the chaining session.

          • Optional ReadonlychainingSeedMediaId?: string

            Seed media id of the chaining session (chaining_seed_media_id), in the form the caller holds it.

          • Optional ReadonlychainingSessionId?: string

            Opaque chaining-session id.

          • Optional ReadonlyclientPosition?: string | number

            Client position in the viewer.

          • Optional ReadonlyfriendsLane?: false

            The tab entry's friends-lane prefetch (clips/discover/social/) is the bottom bar tap's; the landing after a published reel opens the same tab without it (run-reel-plain-20261026-2056), so it declares false. Absent: the entry sends it.

          • Optional Readonlymedia?: {
                code: string;
                id: string;
                media_type: number;
                organic_tracking_token?: string;
                pk: string;
                taken_at?: number;
                user?: { id?: string; pk?: string };
                video_duration?: number;
            }
            • Readonlycode: string

              The media's shortcode, the item's identity key.

            • Readonlyid: string

              Container media id (<pk>_<authorPk>).

            • Readonlymedia_type: number
            • Optional Readonlyorganic_tracking_token?: string
            • Readonlypk: string

              The media's numeric pk.

            • Optional Readonlytaken_at?: number
            • Optional Readonlyuser?: { id?: string; pk?: string }
            • Optional Readonlyvideo_duration?: number

              The clip's length in seconds, when the answer carries it.

          • Optional ReadonlymediaPctWatched?: string | number

            Percentage of the clip watched before the like (0–100), the app's measurement.

          • Optional ReadonlyrankingSessionId?: string

            Ranking session id.

          • Optional ReadonlystoryRankingToken?: string

            The reel's story ranking token.

      Returns {
          chainingPosition?: string | number;
          chainingSeedMediaId?: string;
          chainingSessionId?: string;
          clientPosition?: string | number;
          mediaPctWatched?: string | number;
          rankingSessionId?: string;
          storyRankingToken?: string;
      }

      • Optional ReadonlychainingPosition?: string | number

        Zero-based position in the chaining session.

      • Optional ReadonlychainingSeedMediaId?: string

        Seed media id of the chaining session (chaining_seed_media_id), in the form the caller holds it.

      • Optional ReadonlychainingSessionId?: string

        Opaque chaining-session id.

      • Optional ReadonlyclientPosition?: string | number

        Client position in the viewer.

      • Optional ReadonlymediaPctWatched?: string | number

        Percentage of the clip watched before the like (0–100), the app's measurement.

      • Optional ReadonlyrankingSessionId?: string

        Ranking session id.

      • Optional ReadonlystoryRankingToken?: string

        The reel's story ranking token.