PHPackages                             haistar/tiktokshop-api-client - 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. [API Development](/categories/api)
4. /
5. haistar/tiktokshop-api-client

ActiveLibrary[API Development](/categories/api)

haistar/tiktokshop-api-client
=============================

Unofficial Tiktok Shop API Client build in PHP

v3.0.0(3y ago)103897PHP

Since Mar 24Pushed 3y ago2 watchersCompare

[ Source](https://github.com/raviMukti/tiktokshop-api-client)[ Packagist](https://packagist.org/packages/haistar/tiktokshop-api-client)[ RSS](/packages/haistar-tiktokshop-api-client/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (6)Dependencies (3)Versions (7)Used By (0)

Unofficial Tiktok Shop API Client build in PHP
==============================================

[](#unofficial-tiktok-shop-api-client-build-in-php)

### How To Install

[](#how-to-install)

`composer require haistar/tiktokshop-api-client`

### Generate Authorization URL

[](#generate-authorization-url)

```
$authUrl = TiktokShopAuthResource::generateAuthUrl($_ENV["AUTH_URL"], $_ENV["APP_KEY"]);

```

### Get Access Token

[](#get-access-token)

```
$tiktokShopConfig = new TiktokShopConfig();
$tiktokShopConfig->setAppKey($_ENV["APP_KEY"]);
$tiktokShopConfig->setSecretKey($_ENV["APP_SECRET"]);

$tiktokAuthResource = new TiktokShopAuthResource();

$baseUrl = $_ENV["AUTH_URL"];
$apiAccessToken = "/api/v2/token/get";

$params = [
    "auth_code" => $_ENV["AUTH_CODE"],
    "grant_type" => "authorized_code",
];

$response = $tiktokAuthResource->httpCallGet($baseUrl, $apiAccessToken, $params, $tiktokShopConfig);

$this->assertEquals("0", $response->code);
$this->assertEquals("success", $response->success);

```

### Renew Refresh Token

[](#renew-refresh-token)

```
$tiktokShopConfig = new TiktokShopConfig();
$tiktokShopConfig->setAppKey($_ENV["APP_KEY"]);
$tiktokShopConfig->setSecretKey($_ENV["APP_SECRET"]);

$tiktokAuthResource = new TiktokShopAuthResource();

$baseUrl = $_ENV["AUTH_URL"];
$apiRenewRefreshToken = "/api/v2/token/refresh";

$params = [
    "refresh_token" => $_ENV["REFRESH_TOKEN"],
    "grant_type" => "refresh_token",
];

$response = $tiktokAuthResource->httpCallGet($baseUrl, $apiRenewRefreshToken, $params, $tiktokShopConfig);

$this->assertEquals("0", $response->code);
$this->assertEquals("success", $response->success);

```

### TiktokShop Global API

[](#tiktokshop-global-api)

```
$tiktokShopConfig = new TiktokShopConfig();
$tiktokShopConfig->setAppKey($_ENV["APP_KEY"]);
$tiktokShopConfig->setSecretKey($_ENV["APP_SECRET"]);
$tiktokShopConfig->setAccessToken($_ENV["ACCESS_TOKEN"]);

$tiktokGeneralResource = new TiktokShopGeneralResource();

$baseUrl = $_ENV["SERVER_URL"];
$apiAuthorizedShop = "/api/shop/get_authorized_shop";

$response = $tiktokGeneralResource->httpCallGet($baseUrl, $apiAuthorizedShop, [], $tiktokShopConfig);

$this->assertEquals(0, $response->code);
$this->assertEquals($_ENV["SELLER_NAME"], $response->data->shop_list[0]->shop_name);

```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.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

Every ~75 days

Total

5

Last Release

1208d ago

Major Versions

v1.0.0 → v2.0.02022-03-25

v2.1.1 → v3.0.02023-01-17

### Community

Maintainers

![](https://www.gravatar.com/avatar/a466e589fb79a8d7fab510080669ae5f0b1977c0d37ae9eb52ef7442ecba805a?d=identicon)[raviMukti](/maintainers/raviMukti)

---

Top Contributors

[![raviMukti](https://avatars.githubusercontent.com/u/40047230?v=4)](https://github.com/raviMukti "raviMukti (11 commits)")[![prayogadhi](https://avatars.githubusercontent.com/u/7447942?v=4)](https://github.com/prayogadhi "prayogadhi (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/haistar-tiktokshop-api-client/health.svg)

```
[![Health](https://phpackages.com/badges/haistar-tiktokshop-api-client/health.svg)](https://phpackages.com/packages/haistar-tiktokshop-api-client)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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