ProtectedapiGet the API base URL for the platform
ProtectedaxiosGet or create axios instance with authentication
ProtectedcommonCommon parameters for all social media actions
Get the description for this action
ProtectedfacebookFacebook Page ID (stored in CustomAttribute2) - required for Instagram Business API
ProtectedinstagramInstagram Business Account ID (stored in CustomAttribute1)
ProtectedoauthOAuth-specific parameters that all OAuth actions should include
Define the parameters for this action
ProtectedplatformGet the platform name (e.g., 'Twitter', 'LinkedIn')
ProtectedbuildBuild common API headers including authentication
OptionaladditionalHeaders: Record<string, string>ProtectedformatFormat date for API requests (ISO 8601)
ProtectedgetGet the current access token
ProtectedgetGet custom attributes from company integration
ProtectedgetProtectedgetHelper to get parameter value from params array
ProtectedgetGet profile ID from parameters or default from integration
ProtectedgetGet the refresh token
ProtectedhandleHandle Instagram-specific errors
ProtectedhandleProtectedhandleHandle rate limiting with exponential backoff
OptionalretryAfter: numberProtectedinitializeInitialize OAuth connection by loading integration details.
the MJ Company Integration ID to load
Optionalparams: RunActionParamsthe 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.
ProtectedInternalInternal method that must be implemented by derived action classes. This is where the actual action logic should be implemented.
The action execution parameters including typed context
Promise resolving to the action result
ProtectedisDetermine if an error is an authentication error. Can be overridden by subclasses for platform-specific error detection.
ProtectedisCheck if media container is ready for publishing
ProtectedisCheck if the current token is expired
ProtectedlogLog API request for debugging
Optionaldata: anyProtectedlogLog API response for debugging
ProtectedmakeProtectedmakeMake an Instagram Graph API request
Optionaldata: anyOptionalparams: anyProtectednormalizeNormalize platform-specific analytics to common format
ProtectednormalizeNormalize Instagram post to common format
ProtectedparseParse date from API response
ProtectedparseParse rate limit headers from API response
ProtectedpublishPublish a media container
ProtectedrefreshRefresh the Instagram/Facebook access token
Executes the action with the provided parameters.
The action execution parameters including context
Promise resolving to the action result
ProtectedsearchSearch for posts (limited to business account's own posts)
ProtectedsetSet custom attributes in company integration
ProtectedupdateUpdate stored tokens after refresh
OptionalrefreshToken: stringOptionalexpiresIn: numberProtecteduploadProtecteduploadProtectedvalidateProtectedwaitWait for media container to be ready
Retrieves comments for an Instagram post, including nested replies. Supports filtering, pagination, and sentiment analysis.