Repost Script Configuration
This page documents the configuration parameters for the repost script used in task creation.
Overview
The repost script is used to automatically repost TikTok videos. 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.
The repost script only supports TikTok. Instagram does not have a native repost feature.
Script Configuration (script_config)
The script_config object contains the parameters for the repost script. Below are the available parameters:
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| target_post_urls | string[] | Yes* | [] | Array of target post URLs to repost (one task per URL) |
| target_post_url | string | Yes* | "" | Single target post URL or multiple URLs separated by newlines/commas |
Either target_post_urls array or target_post_url string must be provided. If both are provided, target_post_urls takes priority.
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
Repost a Single Post
curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"serials": ["device_serial_1"],
"script_name": "repost",
"script_config": {
"target_post_url": "https://www.tiktok.com/@username/video/1234567890"
}
}'
Repost Multiple Posts
When reposting 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": "repost",
"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 Reposts 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": "repost",
"script_config": {
"target_post_url": "https://www.tiktok.com/@username/video/1234567890"
},
"start_time": "14:30"
}'
Repost by Username List Mode
Create repost 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": "repost",
"script_config": {
"target_post_url": "https://www.tiktok.com/@target/video/123"
}
}'
Batch Repost 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": "repost",
"script_config": {
"target_post_url": "https://www.tiktok.com/@viral/video/999"
},
"enable_multi_account": true
}'
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/
How Repost Works
- The script opens the target post URL.
- It checks if the post is already reposted — if so, it skips to avoid duplicate reposts.
- It clicks the Share button, then selects Repost from the share menu.
- It confirms the repost action.
Best Practices
-
Schedule tasks: Use the
start_timeparameter to spread out reposts over time, reducing the chance of rate limiting. -
Batch wisely: Don't create too many repost tasks at once. Platforms may have rate limits on reposting.
-
Use multi-account mode: Enable
enable_multi_accountto repost videos using multiple accounts on the same device.
Error Codes
| Code | Description |
|---|---|
| 40001 | Missing target post URL |
| 40003 | Script not supported via API |
| 40301 | API access requires Pro+ plan |
See Also
- Task Management API - Create, list, and manage tasks
- Like Script Configuration - Configure like script parameters
- Comment Script Configuration - Configure comment script parameters
- Local API Overview - API overview and quick start