Skip to main content

Like Script Configuration

This page documents the configuration parameters for the like script used in task creation.

Overview

The like script is used to automatically like posts on TikTok or Instagram. When you provide multiple target post URLs via API, one task is created per target post URL. You can control when each task executes using the start_time parameter.

Script Configuration (script_config)

The script_config object contains the parameters for the like script. Below are the available parameters:

Parameters

ParameterTypeRequiredDefaultDescription
target_post_urlsstring[]Yes*[]Array of target post URLs to like (one task per URL)
target_post_urlstringYes*""Single target post URL or multiple URLs separated by newlines/commas
access_methodstringNo"direct"How to navigate to the post: direct (via URL)
note

Either target_post_urls array or target_post_url string must be provided. If both are provided, target_post_urls takes priority.

Task Creation

When multiple target post URLs are provided, the API creates one task per target post URL. For example, if you specify 3 post URLs and 2 devices, 6 tasks will be created. Use the start_time parameter to control when tasks start executing.

Examples

Like a Single Post

curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"serials": ["device_serial_1"],
"script_name": "like",
"script_config": {
"target_post_url": "https://www.tiktok.com/@username/video/1234567890"
}
}'

Like Multiple Posts

When liking multiple posts, one task is created per post:

curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"serials": ["device_serial_1"],
"script_name": "like",
"script_config": {
"target_post_urls": [
"https://www.tiktok.com/@user1/video/111",
"https://www.tiktok.com/@user2/video/222",
"https://www.tiktok.com/@user3/video/333"
]
}
}'

This creates 3 separate tasks that execute immediately.

Schedule Likes with Start Time

Use start_time to schedule when tasks should start:

curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"serials": ["device_serial_1"],
"script_name": "like",
"script_config": {
"target_post_url": "https://www.tiktok.com/@username/video/1234567890"
},
"start_time": "14:30"
}'

Like Posts by Username List Mode

Create like tasks directly for specific accounts:

curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"usernames": ["@my_account1", "@my_account2"],
"script_name": "like",
"script_config": {
"target_post_url": "https://www.tiktok.com/@target/video/123"
}
}'

Batch Like on Multiple Devices

curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"serials": ["device_1", "device_2", "device_3"],
"script_name": "like",
"script_config": {
"target_post_url": "https://www.tiktok.com/@viral/video/999"
},
"enable_multi_account": true
}'

Instagram Like Example

The same API works for Instagram posts:

curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"serials": ["device_serial_1"],
"script_name": "like",
"script_config": {
"target_post_url": "https://www.instagram.com/p/ABC123/"
}
}'

Response

{
"code": 0,
"message": "success",
"data": {
"task_ids": [401, 402, 403],
"created_count": 3
}
}

Post URL Formats

TikTok

https://www.tiktok.com/@username/video/1234567890123456
https://vm.tiktok.com/ABCDEFG/

Instagram

https://www.instagram.com/p/ABCDEFGHIJK/
https://www.instagram.com/reel/ABCDEFGHIJK/

Best Practices

  1. Schedule tasks: Use the start_time parameter to spread out likes over time, reducing the chance of rate limiting.

  2. Batch wisely: Don't create too many like tasks at once. Most platforms have rate limits on liking.

  3. Use multi-account mode: Enable enable_multi_account to like posts using multiple accounts on the same device.

Error Codes

CodeDescription
40001Missing target post URL
40003Script not supported via API
40301API access requires Pro+ plan

See Also