1. Go to this page and download the library: Download nvuln/tiktokshop-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nvuln / tiktokshop-php example snippets
use NVuln\TiktokShop\Client;
$app_key = 'your app key';
$app_secret = 'your app secret';
$client = new Client($app_key, $app_secret);
$client->useSandboxMode();
$auth = $client->auth();
$_SESSION['state'] = $state = str_random(40); // random string
$auth->createAuthRequest($state);
$authUrl = $auth->createAuthRequest($state, true);
// redirect user to auth url
header('Location: '.$authUrl);