TikTok for Developers

Developer Docs

Last updated October 5, 2026

Initialize C# SDK

Initialize the SDK before calling any other API. The InitSDK call configures the runtime environment and must succeed before subsequent calls are made.

TT.InitSDK(param)

Initializes the TikTok mini games SDK. Call this method once when the game starts, before invoking any other TT SDK API.

Signature

public static void InitSDK(InitSDKParam param)

Parameters

Field

Type

Description

Required

GameID

string

The mini game App ID

Yes

OnGetUserInfo

Action<JsonObject>

Callback invoked when user info is retrieved

No

OnGetLaunchOptions

Action<JsonObject>

Callback invoked when launch options are retrieved

No

OnGetContainerInfo

Action<JsonObject>

Callback invoked when container info is retrieved

No

IsDebug

bool

Whether to enable debug mode

No

Example

TT.InitSDK(new InitSDKParam
{
    GameID = "your_game_id",
    OnGetUserInfo = info => Debug.Log("User info received"),
    OnGetLaunchOptions = options => Debug.Log("Launch options received"),
    OnGetContainerInfo = info => Debug.Log("Container info received"),
    IsDebug = true
});
TikTok for Developers