Skip to Content
DocumentationAPI ReferenceOverview

API Reference

⚡ 10 min read

Complete API documentation for the Transcodes SDK. Based on transcodes.d.ts type definitions


API Sections

Token API

Authentication tokens and session management. getCurrentMember, getAccessToken, isAuthenticated, signOut

Member API

Member profile retrieval. Fetch by ID or email via transcodes.member.get()

Events API

Event subscription with on() and off(). Listen to AUTH_STATE_CHANGED, TOKEN_REFRESHED, TOKEN_EXPIRED, ERROR

Authentication modals: openAuthLoginModal, openAuthConsoleModal, openAuthAdminModal, openAuthIdpModal

Audit API

Audit logging with trackUserAction() (method name; logs tagged actions)

Init & Config

Dynamic SDK: init(), setConfig(), isInitialized(). Static vs Dynamic API differences

Types

ApiResponse, Member, AuthResult, IdpOpenParams, IdpAuthResponse, event payloads


SDK Structure (TranscodesBaseAPI)

interface TranscodesBaseAPI { token: TokenAPI; member: PublicMemberAPI; on: PublicEventAPI['on']; off: PublicEventAPI['off']; openAuthLoginModal: (params: { projectId?: string; webhookNotification?: boolean }) => Promise<ApiResponse<AuthResult[]>>; openAuthConsoleModal: (params?: { projectId?: string }) => Promise<ApiResponse<null>>; openAuthAdminModal: (params: { projectId?: string; allowedRoles: string[] }) => Promise<ApiResponse<null>>; openAuthIdpModal: (params: IdpOpenParams & { projectId?: string }) => Promise<ApiResponse<IdpAuthResponse[]>>; trackUserAction: (event: { tag: string; severity?: 'low'|'medium'|'high'; status?: boolean; error?: string; metadata?: Record<string, unknown>; page?: string }, options?: { requireAuth?: boolean; webhookNotification?: boolean }) => Promise<void>; isPwaInstalled: () => boolean; }

Last updated on