Revisit Incentives
These APIs enable entry missions and shortcut missions that reward players for returning to the game or adding a desktop shortcut.
TT.StartEntranceMission(param)
Sends the player to the TikTok profile sidebar, which shows how to reopen your mini game from the profile. This method doesn't grant a reward. To check whether the player can receive the reward, call TT.GetEntranceMissionReward after the player reopens the game.
Signature
public static void StartEntranceMission(TTStartEntranceMissionParam param)Parameters
Field | Type | Description | Required |
|
| Called when the API call succeeds. | No |
|
| Called when the API call fails. | No |
|
| Called after | No |
Example
TT.StartEntranceMission(new TTStartEntranceMissionParam
{
success = result =>
{
// Continue the revisit flow; don't grant a reward here
},
fail = error =>
{
// Handle failure
}
});TT.GetEntranceMissionReward(param)
Checks whether the player can receive the reward for reopening your mini game from the TikTok profile sidebar.
Signature
public static void GetEntranceMissionReward(TTGetEntranceMissionRewardParam param)Parameters
Field | Type | Description | Required |
|
| Called when the API call succeeds. Check | No |
|
| Called when the API call fails. | No |
|
| Called after | No |
TTGetEntranceMissionRewardResult
Field | Type | Description |
|
| Whether the player can receive the profile sidebar revisit reward. |
Example
TT.GetEntranceMissionReward(new TTGetEntranceMissionRewardParam
{
success = result =>
{
if (result.canReceiveReward)
{
// Grant the reward in your game
}
},
fail = error =>
{
// Handle the failure
}
});Tip: Test the complete reward flow on a device, including reopening the game from the profile sidebar.
TT.AddShortcut(param)
Prompts the player to add a shortcut to your mini game on their device's home screen.
Signature
public static void AddShortcut(Action<bool> csCallback, bool showToastTipsIfFailed = true)Parameters
Field | Type | Description | Required |
|
| Called with the result. Receives | Yes |
|
| Whether to show a toast message if adding the shortcut fails. Defaults to | No |
Example
TT.AddShortcut(
csCallback: added =>
{
if (added)
{
// Guide the player to reopen the game from the shortcut; don't grant a reward here
}
}
);TT.GetShortcutMissionReward(param)
Claims the reward for adding a desktop shortcut.
Signature
public static void GetShortcutMissionReward(GetShortcutMissionRewardParam param)Parameters
Field | Type | Description | Required |
|
| Success callback with reward info | No |
|
| Failure callback | No |
|
| Completion callback | No |
Example
TT.GetShortcutMissionReward(new GetShortcutMissionRewardParam
{
Success = result => Debug.Log("Shortcut reward claimed"),
Fail = error => Debug.LogError(error.ErrMsg),
Complete = () => Debug.Log("Reward claim flow completed")
});