PHPackages                             stallzhan/tiktok-php-sdk-unofficial - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. stallzhan/tiktok-php-sdk-unofficial

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

stallzhan/tiktok-php-sdk-unofficial
===================================

PHP login kit implemented according to tiktok document

1.0.0.0(3y ago)019MITPHPPHP &gt;=5.6.0

Since Dec 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/zhanzhenping/tiktok-php-sdk-unofficial)[ Packagist](https://packagist.org/packages/stallzhan/tiktok-php-sdk-unofficial)[ Docs](https://github.com/zhanzhenping/tiktok-php-sdk-unofficial)[ RSS](/packages/stallzhan-tiktok-php-sdk-unofficial/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

tiktok-php-sdk-unofficial
=========================

[](#tiktok-php-sdk-unofficial)

PHP login kit implemented according to tiktok document

 Reference Docs Login KitThis is an unofficial SDK for the official Login Kit APIs. Features Current features include:- Generate TikTok Authorization
- Obtain tiktok V2 user information
- Get access token
- Refresh expired Token

 Currently under improvement Video Kit### Installation

[](#installation)

```
composer require stallzhan/tiktok-php-sdk-unofficial
```

### Basic Example

[](#basic-example)

```
// include your composer dependencies
require_once 'vendor/autoload.php';

try {
    $client = new \Tiktok\Client();
    $client->setClientKey("xxx");
    $client->setClientSecret("xxx");
    $client->setScopes([
        "user.info.basic",
        "video.upload"
    ]);
    $client->setState("xxx");
    $client->setRedirectUri("xxx");
    $authUrl = $client->createAuthUrl();
    header("Location: $authUrl");

    if ($_GET['code']) {
        $data = $client->fetchAccessTokenWithAuthCode($_GET['code']);
        $client->setCredentials($data);
    }
} catch (Exception $e) {
    var_dump($e->getMessage());
}
```

### Apis

[](#apis)

#### Installation

[](#installation-1)

Set credentials

```
$client->setCredentials($data);
```

Obtain tiktok V2 user information

```
$server = new \Tiktok\Service($client);
$userinfo = $server->userinfo_v2->get();
```

Refresh expired Token

```
$data = $client->refreshToken();
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1245d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/705a015f7ee73048aaf6f2d7897fd622c10f52df639974d07ca6206b34eb884f?d=identicon)[zhanzhenping](/maintainers/zhanzhenping)

---

Top Contributors

[![HackMayi](https://avatars.githubusercontent.com/u/34760578?v=4)](https://github.com/HackMayi "HackMayi (4 commits)")[![zhanzhenping](https://avatars.githubusercontent.com/u/70517123?v=4)](https://github.com/zhanzhenping "zhanzhenping (2 commits)")

---

Tags

TikTok

### Embed Badge

![Health badge](/badges/stallzhan-tiktok-php-sdk-unofficial/health.svg)

```
[![Health](https://phpackages.com/badges/stallzhan-tiktok-php-sdk-unofficial/health.svg)](https://phpackages.com/packages/stallzhan-tiktok-php-sdk-unofficial)
```

###  Alternatives

[josiasmontag/laravel-recaptchav3

Recaptcha V3 for Laravel package

2641.6M2](/packages/josiasmontag-laravel-recaptchav3)[socialiteproviders/tiktok

TikTok (tiktok.com) OAuth2 Provider for Laravel Socialite

17368.8k1](/packages/socialiteproviders-tiktok)[simplesamlphp/simplesamlphp-module-oidc

A SimpleSAMLphp module adding support for the OpenID Connect protocol

5016.9k1](/packages/simplesamlphp-simplesamlphp-module-oidc)[descope/descope-php

Descope SDK for PHP

3814.0k](/packages/descope-descope-php)[njoguamos/laravel-turnstile

A laravel wrapper for https://developers.cloudflare.com/turnstile/

2315.9k2](/packages/njoguamos-laravel-turnstile)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1516.7k](/packages/truckersmp-steam-socialite)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
