मैसेज स्क्रिप्ट कॉन्फ़िगरेशन
यह पेज message स्क्रिप्ट के कॉन्फ़िगरेशन पैरामीटर का दस्तावेज़ीकरण करता है।
अवलोकन
message स्क्रिप्ट TikTok या Instagram पर स्वचालित रूप से डायरेक्ट मैसेज भेजती है। कई लक्ष्य उपयोगकर्ताओं के लिए API प्रत्येक उपयोगकर्ता के लिए एक टास्क बनाता है। start_time से समय नियंत्रित करें।
स्क्रिप्ट कॉन्फ़िगरेशन (script_config)
मैसेज स्क्रिप्ट के पैरामीटर:
पैरामीटर
| पैरामीटर | प्रकार | आवश्यक | डिफ़ॉल्ट | विवरण |
|---|---|---|---|---|
| target_users | string[] | Yes* | [] | लक्ष्य उपयोगकर्ताओं की सरणी (प्रति उपयोगकर्ता एक टास्क) |
| target_user | string | Yes* | "" | एकल उपयोगकर्ता नाम या कॉमा/नई पंक्ति से अलग |
| message_content | string | Yes | "" | मैसेज का टेक्स्ट |
| access_method | string | No | "direct" | एक्सेस विधि: direct या search |
note
target_users या target_user आवश्यक है। target_users को प्राथमिकता दी जाती है।
info
कई उपयोगकर्ताओं के साथ API प्रत्येक के लिए एक टास्क बनाता है।
उदाहरण
एकल उपयोगकर्ता को मैसेज
curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"serials": ["device_serial_1"],
"script_name": "message",
"script_config": {
"target_users": ["@username_to_message"],
"message_content": "Hello! Check out our latest content.",
"access_method": "direct"
}
}'
कई उपयोगकर्ताओं को मैसेज
प्रत्येक उपयोगकर्ता के लिए एक टास्क:
curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"serials": ["device_serial_1"],
"script_name": "message",
"script_config": {
"target_users": ["@user1", "@user2", "@user3"],
"message_content": "Hi! We have an exclusive offer for you."
}
}'
3 टास्क तुरंत बनाता है।
प्रारंभ समय के साथ मैसेज शेड्यूल
प्रारंभ समय शेड्यूल करें:
curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"serials": ["device_serial_1"],
"script_name": "message",
"script_config": {
"target_users": ["@user1", "@user2"],
"message_content": "Scheduled greeting!"
},
"start_time": "14:30"
}'
खोज विधि से मैसेज
curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"serials": ["device_serial_1"],
"script_name": "message",
"script_config": {
"target_users": ["username1", "username2"],
"message_content": "Hello from TikMatrix!",
"access_method": "search"
}
}'
उपयोगकर्ता नाम सूची मोड से मैसेज
वि शिष्ट खातों के लिए मैसेज टास्क:
curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"usernames": ["@my_account1", "@my_account2"],
"script_name": "message",
"script_config": {
"target_users": ["@target_user"],
"message_content": "Hi there!"
}
}'