Skip to main content

reeln-cli plugin for TikTok video uploads

Project description

reeln-plugin-tiktok

A reeln-cli plugin for uploading rendered videos to TikTok.

Install

pip install reeln-plugin-tiktok

Or for development:

git clone https://github.com/StreamnDad/reeln-plugin-tiktok
cd reeln-plugin-tiktok
make dev-install

Configuration

Add the plugin to your reeln config:

{
  "plugins": {
    "enabled": ["tiktok"],
    "settings": {
      "tiktok": {
        "upload_shorts": true,
        "upload_videos": false,
        "client_key": "awxxxxxxxxxxxxxxxx",
        "client_secret_file": "/path/to/tiktok_client_secret.txt",
        "privacy_level": "SELF_ONLY"
      }
    }
  }
}

OAuth Setup

This plugin requires TikTok OAuth2 credentials. For the initial setup:

  1. Create a TikTok Developer App at developers.tiktok.com
  2. Add scopes: video.upload (inbox/drafts) and optionally video.publish (direct post)
  3. Complete the OAuth2 authorization flow to obtain tokens
  4. Save the credentials to ~/Library/Application Support/reeln/data/tiktok/oauth.json:
{
  "access_token": "act.xxx",
  "refresh_token": "rft.xxx",
  "expires_at": 1712345678.0,
  "open_id": "xxx",
  "scope": "video.upload,user.info.basic"
}

The plugin automatically refreshes expired tokens using the refresh token.

Config Options

Option Type Default Description
upload_shorts bool false Upload portrait renders (width < height)
upload_videos bool false Upload landscape/square renders
direct_post bool false Publish directly to feed (vs inbox/drafts)
dry_run bool false Log actions without calling TikTok API
client_key str required TikTok app client key
client_secret_file str required Path to client secret file
credentials_cache str auto OAuth token cache path
privacy_level str SELF_ONLY PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR, SELF_ONLY
disable_duet bool false Disable duets
disable_comment bool false Disable comments
disable_stitch bool false Disable stitch
brand_content_toggle bool false Paid partnership disclosure (branded content)
brand_organic_toggle bool false Your own brand disclosure
caption_template str "" Template with {home_team}, {away_team}, {date}, {venue}, {sport}
video_cover_timestamp_ms int 1000 Cover frame offset (ms)
chunk_size_bytes int 10485760 Upload chunk size (10 MB)
upload_poll_interval_seconds int 5 Status poll interval
upload_poll_max_attempts int 60 Max poll attempts

Development

make dev-install    # uv venv + editable install with dev deps
make test           # pytest with 100% coverage
make lint           # ruff check
make format         # ruff format
make check          # lint + mypy + test

License

AGPL-3.0-only

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reeln_plugin_tiktok-0.4.0.tar.gz (31.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reeln_plugin_tiktok-0.4.0-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file reeln_plugin_tiktok-0.4.0.tar.gz.

File metadata

  • Download URL: reeln_plugin_tiktok-0.4.0.tar.gz
  • Upload date:
  • Size: 31.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for reeln_plugin_tiktok-0.4.0.tar.gz
Algorithm Hash digest
SHA256 29b8d7ec77b23cc8af63f649d23441417f51dfd5e7cb2281cca0e1269165c131
MD5 c70ca3a03c17add7b818c2a11423ad63
BLAKE2b-256 6e63ad580531b1c531c0bcf45e78db1df22b6c36b61dad243cd8334fa3419599

See more details on using hashes here.

Provenance

The following attestation bundles were made for reeln_plugin_tiktok-0.4.0.tar.gz:

Publisher: release.yml on StreamnDad/reeln-plugin-tiktok

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file reeln_plugin_tiktok-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for reeln_plugin_tiktok-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d144bbb84888e2ab15d50f2846a54f0e6ce9d8476865b40097237d21b8262aca
MD5 267eed1776e72a79dbf24e2b7509e02b
BLAKE2b-256 9a02deba40109f06e09fb8c98dff431ced844f6c782ea673c9b7a2b00d4f3359

See more details on using hashes here.

Provenance

The following attestation bundles were made for reeln_plugin_tiktok-0.4.0-py3-none-any.whl:

Publisher: release.yml on StreamnDad/reeln-plugin-tiktok

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page