TikTok for Developers

Developer Docs

Last updated October 1, 2026

Vibration

Trigger different types of vibrations on the user's device.

TTMinis.game.vibrateShort(opts)

Triggers a short vibration on the device (15 ms).

Parameters

Field

Type

Description

Required

type

string

The vibration intensity type. Valid values: heavy, medium, light.

Yes

success

function

The callback function called when the API call succeeds

No

fail

function

The callback function called when the API call fails

No

complete

function

The callback function called when the API call ends. Called whether the call succeeds or fails.

No

Example

TTMinis.game.vibrateShort({
  type: "medium",
  success(res) {
    console.log("Short vibration triggered");
  },
  fail(err) {
    console.error(err);
  }
});

TTMinis.game.vibrateLong(opts)

Triggers a long vibration on the device (400 ms).

Parameters

Field

Type

Description

Required

success

function

The callback function called when the API call succeeds

No

fail

function

The callback function called when the API call fails

No

complete

function

The callback function called when the API call ends. Called whether the call succeeds or fails.

No

Example

TTMinis.game.vibrateLong({
  success(res) {
    console.log("Long vibration triggered");
  },
  fail(err) {
    console.error(err);
  }
});
TikTok for Developers