Login Script Configuratie
This page documents the configuration parameters for the login script used in task creation.
Overview
The login script is used to automatically log in to a TikTok or Instagram account on a device. It navigates to the login page and enters the credentials stored in TikMatrix for the given account.
Before using this script via API, make sure the account's username and password are stored in TikMatrix's account management.
Script Configuration (script_config)
The script_config object contains the parameters for the login script. Below are the available parameters:
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| username | string | Yes | "" | The username of the account to log in. Must match an account stored in TikMatrix. |
Examples
Login by Device Serial
curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"serials": ["device_serial_1"],
"script_name": "login",
"script_config": {
"username": "@my_tiktok_account"
}
}'
Login by Username
Use username mode to create a login task for a specific account:
curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"usernames": ["@my_tiktok_account"],
"script_name": "login",
"script_config": {
"username": "@my_tiktok_account"
}
}'
Login with Scheduled Start Time
curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"serials": ["device_serial_1"],
"script_name": "login",
"script_config": {
"username": "@my_tiktok_account"
},
"start_time": "09:00"
}'
Login Multiple Accounts on Multiple Devices
curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"usernames": ["@account1", "@account2", "@account3"],
"script_name": "login",
"script_config": {}
}'
In username mode, the system automatically looks up each account and its associated device. The username in script_config is optional when using username mode, as the system uses the username from the usernames list.
Response
{
"code": 0,
"message": "success",
"data": {
"task_ids": [201],
"created_count": 1
}
}
Error Codes
| Code | Description |
|---|---|
| 40001 | Missing required parameters |
| 40003 | Script not supported via API |
| 40301 | API access requires Pro+ plan |
See Also
- Task Management API - Create, list, and manage tasks
- Account Koppeling Script Configuratie - Accounts op apparaat koppelen
- Profiel Script Configuratie - Profiel bijwerken
- Local API Overview - API overview and quick start