Use our simplified API to post photos and videos to TikTok without dealing with complex OAuth flows or token management.
Use your API key to publish content directly. The account is automatically detected from your API key:
Authorization: Bearer your-api-key
Post photos or videos directly to TikTok with automatic media processing. The account is automatically detected from your API key.
Authorization: Bearer your-api-key
Content-Type: application/json
{
"media_type": "PHOTO",
"photo_images": [
"https://example.com/image1.jpg",
"https://example.com/image2.jpg"
],
"photo_cover_index": 0,
"post_info": {
"title": "Check out these amazing photos! #photography",
"privacy_level": "SELF_ONLY",
"disable_comment": false,
"auto_add_music": false
}
}
{
"media_type": "VIDEO",
"video_url": "https://example.com/video.mp4",
"post_info": {
"title": "My awesome video! #viral #trending",
"privacy_level": "SELF_ONLY",
"disable_comment": false,
"disable_duet": false,
"disable_stitch": false
}
}
{
"success": true
}
{
"success": false,
"error": "Error message describing what went wrong"
}
Simplified API: The account is automatically detected from your API key, and all media URLs are processed automatically. No need to specify account_id
, source
, or post_mode
fields.
Note: This endpoint is currently not returning publish_id from POST requests. Status checking may be added in future updates.
As our TikTok app is currently in sandbox mode (unaudited), the following restrictions apply:
These limitations will be removed once our app completes TikTok's audit process.
Error | Description |
---|---|
401 | Invalid or missing API key |
400 | Invalid request format or missing required fields |
429 | Daily usage limit exceeded |
413 | File size exceeds limits |
const response = await fetch('https://yourapp.com/api/tiktok/direct-post', {
method: 'POST',
headers: {
'Authorization': 'Bearer your-api-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
media_type: 'PHOTO',
photo_images: ['https://example.com/image.jpg'],
post_info: {
title: 'My awesome post! #photography',
privacy_level: 'SELF_ONLY',
disable_comment: false
}
})
});
const result = await response.json()
import requests
response = requests.post(
'https://yourapp.com/api/tiktok/direct-post',
headers={
'Authorization': 'Bearer your-api-key',
'Content-Type': 'application/json'
},
json={
'media_type': 'VIDEO',
'video_url': 'https://example.com/video.mp4',
'post_info': {
'title': 'My viral video! #trending',
'privacy_level': 'SELF_ONLY',
'disable_comment': False,
'disable_duet': False
}
}
)
result = response.json()
print(result)
curl -X POST https://yourapp.com/api/tiktok/direct-post \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"media_type": "PHOTO",
"photo_images": ["https://example.com/image.jpg"],
"post_info": {
"title": "Posted via Social Viber API!",
"privacy_level": "SELF_ONLY",
"disable_comment": false
}
}'
Need help? Check out our Dashboard for API usage analytics and account management, or contact our support team.