Member Junction
    Preparing search index...

    Base class for all Instagram actions. Handles Instagram Graph API and Basic Display API authentication and common functionality. Instagram uses Facebook's Graph API infrastructure.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _companyIntegration: MJCompanyIntegrationEntity
    _integration: MJIntegrationEntity

    Accessors

    • get oauthParams(): ActionParam[]

      OAuth-specific parameters that all OAuth actions should include

      Returns ActionParam[]

    Methods

    • Get the current access token

      Returns string

    • Get custom attributes from company integration

      Parameters

      • attributeNumber: 1 | 2 | 3 | 4 | 5

      Returns string

    • Get the refresh token

      Returns string

    • Initialize OAuth connection by loading integration details.

      Parameters

      • companyIntegrationId: string

        the MJ Company Integration ID to load

      • Optionalparams: RunActionParams

        the running action's params; params.Provider is captured so all subsequent entity loads/saves bind to the per-request provider (multi-tenant correctness). When omitted, falls back to the global default Metadata provider.

      Returns Promise<boolean>

    • Determine if an error is an authentication error. Can be overridden by subclasses for platform-specific error detection.

      Parameters

      • error: any

      Returns boolean

    • Check if the current token is expired

      Returns boolean

    • Make an authenticated API request with automatic retry on auth failure

      Type Parameters

      • T

      Parameters

      • requestFn: (token: string) => Promise<T>
      • OptionalretryOnAuthFailure: boolean

      Returns Promise<T>

    • Set custom attributes in company integration

      Parameters

      • attributeNumber: 1 | 2 | 3 | 4 | 5
      • value: string

      Returns Promise<void>

    • Update stored tokens after refresh

      Parameters

      • accessToken: string
      • OptionalrefreshToken: string
      • OptionalexpiresIn: number

      Returns Promise<void>