TikTok for Developers

Developer Docs

Last updated October 22, 2026

Basic Utility

These basic utility APIs provide core functionality for networking and checking compatibility within the mini app environment.

Note: The TikTok Minis SDK is loaded from https://connect.tiktok-minis.com/drama/sdk.js. After initialization, the TTMinis object is mounted on the global scope. All APIs are accessed via the TTMinis.xxx namespace.

TTMinis.init(options)

Initializes the SDK. Authentication-related APIs require init to be called first.

Parameters

Field

Type

Description

Required

clientKey

string

The client key obtained from the TikTok for Developers platform.

Yes

Returns

void

Example

// index.html
<head>
  <script src="https://connect.tiktok-minis.com/drama/sdk.js"></script>
  <script>
    TTMinis.init({
      clientKey: 'your_client_key',
    });
  </script>
</head>

TTMinis.canIUse(feature)

Checks whether the current runtime environment supports a specific capability or field.

Parameters

Field

Type

Description

Required

feature

string

The capability path using dot notation, such as login or authorize.object.scope.

Yes

Returns

Field

Type

Description

result

boolean

Whether the feature is available in the current version.

Example

if (TTMinis.canIUse('createRewardedVideoAd')) {
  console.log('Rewarded video ad is supported');
}

if (TTMinis.canIUse('authorize.object.scope')) {
  console.log('authorize.scope field is supported');
}
TikTok for Developers