Protected_Protected_ProtectedaxiosAxios instance for API requests
ProtectedapiGet the API base URL for the platform
ProtectedcommonCommon parameters for all social media actions
Metadata about this action
ProtectedoauthOAuth-specific parameters that all OAuth actions should include
Define the parameters this action expects
ProtectedplatformGet the platform name (e.g., 'Twitter', 'LinkedIn')
ProtectedbuildBuild common API headers including authentication
OptionaladditionalHeaders: Record<string, string>ProtectedformatFormat bytes to human readable size
ProtectedformatFormat date for API requests (ISO 8601)
ProtectedgetGet the current access token
ProtectedgetGet custom attributes from company integration
ProtectedgetHelper to get parameter value from params array
ProtectedgetGet profile ID from parameters or default from integration
ProtectedgetGet quota cost for an operation
ProtectedgetGet the refresh token
ProtectedhandleProtectedhandleHandle rate limiting with exponential backoff
OptionalretryAfter: numberProtectedhandleHandle YouTube API errors
ProtectedinitializeInitialize the axios instance with base configuration
ProtectedinitializeInitialize 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.
ProtectedInternalGet analytics for a YouTube channel
ProtectedisDetermine if an error is an authentication error. Can be overridden by subclasses for platform-specific error detection.
ProtectedisCheck if the current token is expired
ProtectedlogLog API request for debugging
Optionaldata: anyProtectedlogLog API response for debugging
ProtectedmakeProtectedmakeProtectednormalizeNormalize platform-specific analytics to common format
ProtectednormalizeProtectedparseParse date from API response
ProtectedparseParse ISO 8601 duration to seconds
ProtectedparseParse rate limit headers from API response
ProtectedrefreshYouTube-specific OAuth token refresh
Executes the action with the provided parameters.
The action execution parameters including context
Promise resolving to the action result
ProtectedsearchProtectedsetSet custom attributes in company integration
ProtectedupdateUpdate stored tokens after refresh
OptionalrefreshToken: stringOptionalexpiresIn: numberProtecteduploadProtecteduploadProtecteduploadUpload video to YouTube
ProtectedvalidateProtectedvalidate
Action to get analytics for a YouTube channel