npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@volter/twin-tiktok

v1.0.0

Published

TikTok twin (Protocol 3): Login Kit's authorize page and tokens, the Content Posting API (videos by chunked upload, direct and to the inbox; photos pulled from verified URLs; post status) and the Display API (user info and stats, videos), as Postiz calls

Readme

@volter/twin-tiktok

The TikTok twin (Protocol 3), serving what Postiz calls (journeys/demand.json, journeys/decisions.json). TikTok publishes no OpenAPI document of these APIs; the open lane's spec is written from developers.tiktok.com's reference pages (open/spec/SOURCE.md).

  • The open lane (open.tiktokapis.com, open-upload.tiktokapis.com, www.tiktok.com/v2/auth/authorize/):
    • the authorize page, where a TikTok person logs in and consents; the redirect carries code, scopes, state;
    • the token (a code once, a refresh token once; act./rft. tokens drawn from the World's secret, kept by SHA-256);
    • user info (fields gated by scope; video_count counted from the person's public videos) and creator info;
    • posting: a video directly or to the creator's inbox by chunked upload (the chunk plan checked, the bytes kept as blobs), photos pulled from URLs the app verified (through the World: a URL it does not serve fails the pull), and the post's status, moved only by src/semantics/states.ts;
    • the videos a direct post makes (the Video Object; duration and size read from the MP4's boxes, the cover a labeled placeholder), listed newest first by cursor and queried by id.
  • The business lane (business-api.tiktok.com, business/spec/SOURCE.md): Postiz's TikTok Business provider. Every answer is HTTP 200 with TikTok's code (0, or 40001/40002/40102/40104/40105/40107/40110/40131):
    • the business app's token (the same authorize page, a code once, a refresh token once, 24-hour access tokens);
    • the account's profile and analytics (fields a JSON array) and its public posts' counts, paged by cursor;
    • publishing a video or photos by URL: TikTok pulls them through the World, so a URL nothing in the World serves fails the pull (FAILED, video_pull_failed/photo_pull_failed); the status moves only by src/semantics/states.ts;
    • the locations a post may tag and the Commercial Music Library's tracks, searched and listed by genre.

The developer site's app, its redirect URIs and URL properties, TikTok's people and a video's audience are the World's doors (POST /_twin/app-credentials, /_twin/apps with redirect_uris and business_redirect_uris, /_twin/people, /_twin/videos/{id}/stats, /_twin/locations, /_twin/tracks). The credential door answers TIKTOK_CLIENT_ID, TIKTOK_CLIENT_SECRET, TIKTOK_BUSINESS_CLIENT_ID and TIKTOK_BUSINESS_CLIENT_SECRET.