Getting Started with Social Viber API
🚀 Quick Setup Guide
Get your TikTok posting API up and running in minutes. No complex OAuth flows or manual token management required.
Step 1: Create Your Account
Step 2: Connect Your TikTok Account
TikTok Account Requirements
- • Private Account: Your TikTok account must be set to private
- • Active Account: Regular posting activity is recommended
- • Valid Email: TikTok account should have a verified email
Connection Process
- 1. Navigate to Dashboard
After login, go to your Dashboard - 2. Access Accounts Section
Click on "Accounts" in the sidebar or navigate to Dashboard → Accounts - 3. Connect TikTok
Click the "Connect TikTok Account" button and follow the prompts to authorize access. - 4. TikTok Authorization
You'll be redirected to TikTok's official OAuth page. Log in and authorize Social Viber to access your account. - 5. Confirmation
You'll be redirected back to Social Viber with a success message.
Step 3: Get Your API Key
🔑 API Key Management
- 1. After connecting your TikTok account, your API key will be shown once. Copy and store it securely.
- 2. If you lose your API key, you must generate a new one from the Accounts page. Old keys become invalid when a new one is generated.
🔒 Security Best Practices
- • Never share your API key publicly or in client-side code
- • Store it in environment variables or secure key management
- • Regenerate your key if you suspect it's been compromised
- • Use HTTPS for all API requests
Step 4: Make Your First API Call
Now you're ready to post content to TikTok! Here's a simple example to get you started:
Test with cURL
curl -X POST https://socialviber.com/api/tiktok/direct-post -H "Authorization: Bearer YOUR_API_KEY_HERE" -H "Content-Type: application/json" -d '{
"media_type": "PHOTO",
"photo_images": ["https://example.com/your-image.jpg"],
"post_info": {
"title": "My first API post! #socialviber #api",
"privacy_level": "SELF_ONLY",
"disable_comment": false
}
}'
Test with JavaScript
const response = await fetch('https://socialviber.com/api/tiktok/direct-post', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY_HERE',
'Content-Type': 'application/json'
},
body: JSON.stringify({
media_type: 'PHOTO',
photo_images: ['https://example.com/your-image.jpg'],
post_info: {
title: 'My first API post! #socialviber #api',
privacy_level: 'SELF_ONLY',
disable_comment: false
}
})
});
const result = await response.json();
console.log(result); // { "success": true }
Expected Success Response
{
"success": true
}
Example Error Response
{
"success": false,
"error": "Error message describing what went wrong"
}
Step 5: Monitor Your Usage
📊 Dashboard Features
Your dashboard provides comprehensive monitoring tools:
- • API Usage: Track your daily API call counts
- • Post History: View all your published content
- • Account Status: Monitor connection health
- • Error Logs: Debug failed requests
Next Steps
🎉 You're All Set!
Congratulations! You now have everything you need to start posting to TikTok via our API.
Remember: Start with test posts using the "SELF_ONLY" privacy setting to ensure everything works correctly before scaling up your usage.