PHP code example of zero-shuai / tiktok-business-api-sdk-php

1. Go to this page and download the library: Download zero-shuai/tiktok-business-api-sdk-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/ */

    

zero-shuai / tiktok-business-api-sdk-php example snippets


use TikTok\BusinessApi\Api\ToolApi;
use TikTok\BusinessApi\ApiClient;

$api = new ToolApi(new ApiClient());
$response = $api->searchRegion('ADVERTISER_ID', 'ACCESS_TOKEN', [
    'language' => 'en',
]);
json
{
  "repositories": [{"type": "path", "url": "../tiktok-business-api-sdk/php_sdk"}],
  "