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.3.0.tar.gz (25.8 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.3.0-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: reeln_plugin_tiktok-0.3.0.tar.gz
  • Upload date:
  • Size: 25.8 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.3.0.tar.gz
Algorithm Hash digest
SHA256 f568323e56ae27ef3827ce501a5f3d672dd6b3675368db182e2da8b1a95d2799
MD5 69fde5e64872321116d372309a1e41bd
BLAKE2b-256 2d482d3efe07d800da9cc73eb277fbebba95cf02551c815ef3f649b4b019ea03

See more details on using hashes here.

Provenance

The following attestation bundles were made for reeln_plugin_tiktok-0.3.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.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for reeln_plugin_tiktok-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 02122701c232e86853ce98bd408f3320a50407b7c39e794fc41956a908049de9
MD5 15ce900560cb1d594cf60444ab81fed1
BLAKE2b-256 dd6aa054737fe41299b5c316bd8710b601a870307c3024938ce22f1f78b2cd06

See more details on using hashes here.

Provenance

The following attestation bundles were made for reeln_plugin_tiktok-0.3.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