/!\ WIP: Not ready for production.
Convenient wrapper for TikTok Marketing API.
$ composer require promopult/tiktok-marketing-api
or
"require": {
// ...
"promopult/tiktok-marketing-api": "*"
// ...
}
See examples folder.
$credentials = \Promopult\TikTokMarketingApi\Credentials::fromAccessToken(
getenv('__ACCESS_TOKEN__')
);
// Any PSR-18 HTTP-client
$httpClient = new \GuzzleHttp\Client();
$client = new \Promopult\TikTokMarketingApi\Client(
$credentials,
$httpClient
);
$response = $client->user->info();
print_r($response);
//Array
//(
// [message] => OK
// [code] => 0
// [data] => Array
// (
// [create_time] => 1614175583
// [display_name] => my_user
// [id] => xxx
// [email] => xxx
// )
//
// [request_id] => xxx
//)