TikTok

MaviBot has an integration with TikTok — one of the world's most dynamic and popular social platforms. This marks a new chapter for our ecosystem. TikTok, where millions of users engage daily, is the epicenter of modern communication, trends, and new interactive formats. This integration allows businesses and projects to connect with a younger audience on a whole new level.

We will review the technical aspects of the process:

  • the steps required to activate the integration

  • the available callbacks

  • the permissions that need to be granted

In addition, we will focus specifically on the nuances of regional availability.

Integrating TikTok with MaviBot is more than a technical update—it's an opportunity to be at the forefront of audience communication, use the hottest channel for promotion, and engage users where they spend their time.

How to prepare your account for integration

Let's start with the most important step—setting up the connection correctly.

Before connecting your account, you must switch to a Business Account.

Step 1: Go to the "Settings and privacy" section.

Step 2: Then, go to the "Account" section.

Step 3: Click on "Switch to Business Account".

Step 4: Fill in your business details.

Done! Your account is now ready to be connected to MaviBot.

How to connect your account to MaviBot

Go to the "Messengers" section and click the TikTok button.

Next, log in to your TikTok account in the window that appears.

And grant MaviBot access to your account.

You will then be automatically redirected to the "Messengers" section in MaviBot, where you will see a notification confirming the successful integration.

TikTok specifics

  1. To be able to message a user, they must start the chat first.

  2. You can send up to 10 messages within a 48-hour period after receiving a message from a TikTok user. Example: If you receive one message from a user, you can send up to 10 messages in the next 48 hours. If the same user sends another message later, a new 48-hour window will begin, allowing you to send another 10 messages to that user.

  3. A message cannot contain both text and an image simultaneously.

  4. Sending and receiving image attachments via the API is only available if both the sender and the recipient are located in countries that support images in private messages. Image sharing is not available in all countries.

  5. The maximum size for an image attachment is 3 megabytes.

  6. A single message can contain only one attachment.

Callbacks

tiktok_client_new_comment <video_id>: <comment_text> - a user left a comment on your video.

tiktok_client_share_post <shared_video_id> <url> - a user sent a video in the direct messages of the connected account.

Stored client variables

tiktok_comment_id - comment ID. Saved when a user comments on your video and used to reply to that comment.

tiktok_comment_video_id - ID of the video being commented on. Saved when a user comments on your video and used to reply to the comment.

tiktok_is_follower - becomes True if the user is following your account.

tiktok_conversation_id - chat ID. Generated after a user sends a message in the chat. Required for sending messages; do not delete!

Buttons

The maximum number of buttons in a single message is 3.

TikTok supports two types of buttons: callback and "default" (URL). However, a single message can only contain buttons of one type.

Example 1.

Example 2.

Result

Please note!

Button messages are not available on TikTok Desktop. In the desktop chat, you will see a notification like this:

However, in the mobile app, the message will display correctly:

The display text on the button and the text sent to the bot upon clicking are identical. The button is generated using data from the "Reply Message Text" or "URL" field in the button's settings.

  1. Callback buttons appear as regular buttons. When clicked, they send a message in the chat on behalf of the user, containing the button's text. Maximum length is 20 characters.

  2. URL buttons appear as links. However, their behavior is the same as callback buttons. Currently, TikTok does not support creating buttons that open a web page at the specified URL when clicked. Maximum length is 40 characters.

Functions

How to reply to a comment:

tiktok_create_comment(text, comment_video_id, comment_id) - posts a reply to the specified comment.

Parameter
Description

! text

required parameter, the comment text

comment_video_id

The video ID where the comment is posted. This is an optional parameter; if it is not provided, the value will be taken from the tiktok_comment_video_id client variable.

comment_id

The comment ID to reply to. This is an optional parameter; if it is not provided, the value from the tiktok_comment_id client variable will be used.

Last updated