curl -X POST https://api.infinipost.co/v1/comments \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"accountId": "acc_123",
"postLinks": ["https://www.tiktok.com/@username/video/7123456789012345678"],
"text": "Amazing content! 🔥",
"scheduledTime": "2024-04-22T12:00:00Z"
}'
const response = await fetch('https://api.infinipost.co/v1/comments', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
accountId: 'acc_123',
postLinks: ['https://www.tiktok.com/@username/video/7123456789012345678'],
text: 'Amazing content! 🔥',
scheduledTime: '2024-04-22T12:00:00Z'
})
});
const data = await response.json();
{
"commentId": "cmt_xyz789",
"accountId": "acc_123",
"username": "@youraccounthandle",
"postLinks": ["https://www.tiktok.com/@username/video/7123456789012345678"],
"text": "Amazing content! 🔥",
"scheduledTime": "2024-04-22T12:00:00Z",
"createdAt": "2024-04-21T20:25:00Z"
}
Engagement
Comment on Post
Add a comment to one or more TikTok posts from one of your accounts
POST
/
v1
/
comments
curl -X POST https://api.infinipost.co/v1/comments \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"accountId": "acc_123",
"postLinks": ["https://www.tiktok.com/@username/video/7123456789012345678"],
"text": "Amazing content! 🔥",
"scheduledTime": "2024-04-22T12:00:00Z"
}'
const response = await fetch('https://api.infinipost.co/v1/comments', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
accountId: 'acc_123',
postLinks: ['https://www.tiktok.com/@username/video/7123456789012345678'],
text: 'Amazing content! 🔥',
scheduledTime: '2024-04-22T12:00:00Z'
})
});
const data = await response.json();
{
"commentId": "cmt_xyz789",
"accountId": "acc_123",
"username": "@youraccounthandle",
"postLinks": ["https://www.tiktok.com/@username/video/7123456789012345678"],
"text": "Amazing content! 🔥",
"scheduledTime": "2024-04-22T12:00:00Z",
"createdAt": "2024-04-21T20:25:00Z"
}
TikTok only. Commenting is currently supported on TikTok posts only.
Request Body
string
required
The account ID to comment from.
array
required
Array of TikTok post links to comment on (your own posts or other users’).How to get a post link:
- Open TikTok and navigate to the post you want to comment on
- Tap the Send to arrow button in the bottom right corner of the post
- Tap Copy link
https://www.tiktok.com/@username/video/7123456789012345678string
ISO 8601 timestamp for when to post the comment. If not provided, comments immediately.
string
required
The comment text.
Response
string
Unique identifier for the created comment task.
string
Account that created the comment.
string
TikTok username of the account that created the comment.
array
The TikTok post links that were commented on.
string
Comment text.
string
ISO 8601 timestamp of when the comment is scheduled to be posted.
string
ISO 8601 timestamp of when the comment task was created.
curl -X POST https://api.infinipost.co/v1/comments \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"accountId": "acc_123",
"postLinks": ["https://www.tiktok.com/@username/video/7123456789012345678"],
"text": "Amazing content! 🔥",
"scheduledTime": "2024-04-22T12:00:00Z"
}'
const response = await fetch('https://api.infinipost.co/v1/comments', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
accountId: 'acc_123',
postLinks: ['https://www.tiktok.com/@username/video/7123456789012345678'],
text: 'Amazing content! 🔥',
scheduledTime: '2024-04-22T12:00:00Z'
})
});
const data = await response.json();
{
"commentId": "cmt_xyz789",
"accountId": "acc_123",
"username": "@youraccounthandle",
"postLinks": ["https://www.tiktok.com/@username/video/7123456789012345678"],
"text": "Amazing content! 🔥",
"scheduledTime": "2024-04-22T12:00:00Z",
"createdAt": "2024-04-21T20:25:00Z"
}
Error Responses
Unauthorized
{
"error": {
"code": "unauthenticated",
"message": "Invalid or missing API key"
}
}
Invalid Parameter
{
"error": {
"code": "invalid_parameter",
"message": "postLinks is required and must be a non-empty array"
}
}
Account Not Found
{
"error": {
"code": "not_found",
"message": "Account acc_1a2b3c4d5e not found"
}
}
Platform Not Supported
{
"error": {
"code": "invalid_parameter",
"message": "Commenting is only supported for TikTok accounts"
}
}
Server Error
{
"error": {
"code": "internal",
"message": "An unexpected error occurred"
}
}