AUTOTOK is a full-stack web application that automates TikTok video uploads and scheduling through the official TikTok API. Built with PHP, MySQL. Ultimate tool for content creators to schedule multiple daily posts, manage bulk uploads
- TikTok OAuth 2.0 Authentication
- Multi-Account Management
- Bulk Video Upload
- Smart Scheduling
- Random Caption Selection
- Automatic Token Refresh
- Manual Upload
- Activity Logging
- Export Logs
- Real-time statistics on Dashboard
- CSRF token protection
- Session-based authentication
- PHP 8.0+
- MySQL 5.7+
- HTML5, TailwindCSS, Vanilla JavaScript
- PHP Extensions (PDO, PDO_MySQL, cURL, JSON, mbstring, fileinfo)
- TikTok V2 OAuth API
- Cron-based scheduling system
Iβm not going to tell you how to install it. If you canβt figure it out yourself, then fcuk uπThis script is only for those who know what theyβre doingπͺ
Edit .env with your configuration:
DB_HOST=localhost
DB_NAME=AUTOTOK_db
DB_USER=your_database_username
DB_PASS=your_database_password
TIKTOK_CLIENT_KEY=your_tiktok_client_key
TIKTOK_CLIENT_SECRET=your_tiktok_client_secret
TIKTOK_REDIRECT_URI=https://yourdomain.com/callback.php
APP_URL=https://yourdomain.com
APP_NAME=AUTOTOK
APP_EMAIL=hello@example.com
TIMEZONE=UTC
SESSION_LIFETIME=86400
ENCRYPTION_KEY=generate_random_32_character_key
MAX_VIDEO_SIZE=524288000
ALLOWED_VIDEO_TYPES=mp4
CRON_TIME_TOLERANCE=3
chmod 755 videos/ captions/ logs/
chmod 644 .env
chmod 644 config.php
- Go to Cron Jobs in cPanel
- Command:
/usr/bin/php /home/username/public_html/AUTOTOK/cron_upload.php - Interval: Every 5 minutes (
*/5 * * * *)
Navigate to your installation URL: https://yourdomain.com
- Click the "Authorize with TikTok" button
- Login to your TikTok account
- Grant the required permissions
- You'll be redirected to the dashboard
- Click "Add New" button
- Fill in the form:
- TikTok Username: Profile identifier
- Upload Videos: Select multiple MP4 files
- Captions: Enter JSON array of captions
["Amazing content! π₯", "Check this out! π¬", "New video! β¨"] - Schedule Times: Set up to 3 daily posting times (e.g., 10:00, 15:00, 21:00)
- Click "Add Profile"
- Wait for upload to complete
- Each new profile requires individual TikTok authorization
- Click the "Authorize" button next to the profile
- Login with the specific TikTok account
- Status will change to "Authorized" β
Videos will automatically post at your scheduled times. Monitor activity in the Logs section.
Need to post immediately? Click the βΆ button next to any authorized profile.
- Visit TikTok for Developers
- Click "Get Started" or "Register"
- Login with your TikTok account
- Complete the developer registration
- Go to "My Apps" in the developer portal
- Click "Create App"
- Fill in the required information:
- App Name: AUTOTOK
- Description: Automated video scheduling application
- Category: Media & Entertainment
Enable these scopes/permissions:
- β
user.info.basic- Get user profile information - β
video.upload- Upload videos - β
video.publish- Publish videos to TikTok
In the app settings, add your callback URL:
https://yourdomain.com/callback.php
Important:
- Use HTTPS (required by TikTok)
- Match exactly with
.envconfiguration - Include the full path including
/callback.php
- Find Client Key and Client Secret in your app dashboard
- Copy them to your
.envfile.
For production use, you may need to submit your app for TikTok review. So you can use/test using Sandbox Credentials
Have an idea? We'd love to hear it! Here are some planned features:
- Check if the feature is already requested in Issues
- If not, create a new issue with the
enhancementlabel - Describe your feature in detail:
- Use case: Why you need it
- Expected behavior: How it should work
- Examples: Similar implementations (if any)
Contributions are what make the open-source community amazing! Any contributions you make are greatly appreciated.
- Fork the Project
- Clone Your Fork
- Create a Feature Branch
- Make Your Changes
- Commit Your Changes
- Push to Your Fork
- Open a Pull Request
Before submitting:
- Test on PHP 8.0+
- Test on desktop and mobile browsers
- Verify no PHP errors or warnings
- Check database migrations work correctly
- Test with actual TikTok API (sandbox account)
Star | Issue | Discussion
This project is licensed under the MIT License - see the LICENSE file for details.
TL;DR: You can use this freely, modify it, sell it, whatever. Just don't blame me if something breaks!πͺ
This tool is created for educational and personal use purposes only. Always comply with TIKTOK Terms of Service and API usage policies. The creator is not responsible for any misuse, API violations, or account suspensions. By using this project, you agree that you are doing so at your own risk.
Made with β€οΈ and lots of π¦ by BotolMehedi