Core Methods

Authentication

Method
Description

tiun.login()

Open the login overlay.

tiun.logout()

Clear the user session.

tiun.getUser()

Get the current user state.

tiun.getUserVerificationToken()

Get a signed token for server-side user verification.


Checkout (Subscriptions)

Method
Description

tiun.checkout({ productId })

Open the checkout flow for a subscription product.


Time-based

Method
Description

tiun.start()

Open the connect overlay for time-based billing.


Content & Access

Method
Description

tiun.setContent(options)

Update the current content context.


Lifecycle

Method
Description

tiun.init(config)

Initialize the SDK. Call once at startup.

tiun.destroy()

Destroy the SDK instance and clean up all listeners.

tiun.waitForReady()

Returns a Promise that resolves when the snippet is ready.

tiun.on(event, callback)

Subscribe to an event. Returns an unsubscribe function.

tiun.once(event, callback)

Subscribe to an event once.

Last updated

Was this helpful?