Skip to content

Latest commit

 

History

History
1261 lines (866 loc) · 37 KB

File metadata and controls

1261 lines (866 loc) · 37 KB

Unifapi\Sdk\TiktokApi

All URIs are relative to https://api.unifapi.com, except if the operation defines another base path.

Method HTTP request Description
tiktokFeedRecommendedPost() POST /tiktok/feed/recommended Get TikTok recommendation videos
tiktokHashtagsIdGet() GET /tiktok/hashtags/{id} Get a TikTok hashtag by ID
tiktokHashtagsIdVideosGet() GET /tiktok/hashtags/{id}/videos List videos tagged with a TikTok hashtag
tiktokMusicIdGet() GET /tiktok/music/{id} Get a TikTok music track by ID
tiktokMusicIdVideosGet() GET /tiktok/music/{id}/videos List videos using a TikTok music track
tiktokSearchGet() GET /tiktok/search General TikTok search (returns videos)
tiktokSearchHashtagsGet() GET /tiktok/search/hashtags Search TikTok hashtags by keyword
tiktokSearchUsersGet() GET /tiktok/search/users Search TikTok users by keyword
tiktokSearchVideosGet() GET /tiktok/search/videos Search TikTok videos by keyword
tiktokUsersIdFollowersGet() GET /tiktok/users/{id}/followers List a TikTok user's followers
tiktokUsersIdFollowingGet() GET /tiktok/users/{id}/following List users a TikTok user is following
tiktokUsersIdGet() GET /tiktok/users/{id} Get a TikTok user profile
tiktokUsersIdLikesGet() GET /tiktok/users/{id}/likes List videos liked by a TikTok user
tiktokUsersIdVideosGet() GET /tiktok/users/{id}/videos List videos posted by a TikTok user
tiktokUsersResolveGet() GET /tiktok/users/resolve Resolve a TikTok username to a user id
tiktokVideosBatchPost() POST /tiktok/videos/batch Batch-fetch TikTok videos by ID
tiktokVideosIdCommentsCommentIdRepliesGet() GET /tiktok/videos/{id}/comments/{comment_id}/replies List replies to a TikTok comment
tiktokVideosIdCommentsGet() GET /tiktok/videos/{id}/comments List top-level comments on a TikTok video
tiktokVideosIdGet() GET /tiktok/videos/{id} Get a TikTok video by ID
tiktokVideosResolveGet() GET /tiktok/videos/resolve Resolve a TikTok share URL to a video

tiktokFeedRecommendedPost()

tiktokFeedRecommendedPost($tiktok_feed_recommended_post_request): \Unifapi\\Sdk\Model\TiktokFeedRecommendedPost200Response

Get TikTok recommendation videos

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\TiktokApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$tiktok_feed_recommended_post_request = new \Unifapi\\Sdk\Model\TiktokFeedRecommendedPostRequest(); // \Unifapi\\Sdk\Model\TiktokFeedRecommendedPostRequest

try {
    $result = $apiInstance->tiktokFeedRecommendedPost($tiktok_feed_recommended_post_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TiktokApi->tiktokFeedRecommendedPost: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
tiktok_feed_recommended_post_request \Unifapi\Sdk\Model\TiktokFeedRecommendedPostRequest [optional]

Return type

\Unifapi\Sdk\Model\TiktokFeedRecommendedPost200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokHashtagsIdGet()

tiktokHashtagsIdGet($id): \Unifapi\\Sdk\Model\TiktokHashtagsIdGet200Response

Get a TikTok hashtag by ID

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\TiktokApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 'id_example'; // string

try {
    $result = $apiInstance->tiktokHashtagsIdGet($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TiktokApi->tiktokHashtagsIdGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string

Return type

\Unifapi\Sdk\Model\TiktokHashtagsIdGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokHashtagsIdVideosGet()

tiktokHashtagsIdVideosGet($id, $cursor, $limit): \Unifapi\\Sdk\Model\TiktokHashtagsIdVideosGet200Response

List videos tagged with a TikTok hashtag

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\TiktokApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 'id_example'; // string
$cursor = 'cursor_example'; // string
$limit = 20; // int

try {
    $result = $apiInstance->tiktokHashtagsIdVideosGet($id, $cursor, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TiktokApi->tiktokHashtagsIdVideosGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string
cursor string [optional]
limit int [optional] [default to 20]

Return type

\Unifapi\Sdk\Model\TiktokHashtagsIdVideosGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokMusicIdGet()

tiktokMusicIdGet($id): \Unifapi\\Sdk\Model\TiktokMusicIdGet200Response

Get a TikTok music track by ID

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\TiktokApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 'id_example'; // string

try {
    $result = $apiInstance->tiktokMusicIdGet($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TiktokApi->tiktokMusicIdGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string

Return type

\Unifapi\Sdk\Model\TiktokMusicIdGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokMusicIdVideosGet()

tiktokMusicIdVideosGet($id, $cursor, $limit): \Unifapi\\Sdk\Model\TiktokHashtagsIdVideosGet200Response

List videos using a TikTok music track

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\TiktokApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 'id_example'; // string
$cursor = 'cursor_example'; // string
$limit = 20; // int

try {
    $result = $apiInstance->tiktokMusicIdVideosGet($id, $cursor, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TiktokApi->tiktokMusicIdVideosGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string
cursor string [optional]
limit int [optional] [default to 20]

Return type

\Unifapi\Sdk\Model\TiktokHashtagsIdVideosGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokSearchGet()

tiktokSearchGet($q, $cursor, $limit): \Unifapi\\Sdk\Model\TiktokHashtagsIdVideosGet200Response

General TikTok search (returns videos)

Returns TikTok videos for the keyword q. Use type-specific endpoints when needed.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\TiktokApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$q = 'q_example'; // string | Search keyword
$cursor = 'cursor_example'; // string
$limit = 20; // int

try {
    $result = $apiInstance->tiktokSearchGet($q, $cursor, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TiktokApi->tiktokSearchGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
q string Search keyword
cursor string [optional]
limit int [optional] [default to 20]

Return type

\Unifapi\Sdk\Model\TiktokHashtagsIdVideosGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokSearchHashtagsGet()

tiktokSearchHashtagsGet($q, $cursor, $limit): \Unifapi\\Sdk\Model\TiktokSearchHashtagsGet200Response

Search TikTok hashtags by keyword

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\TiktokApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$q = 'q_example'; // string | Search keyword
$cursor = 'cursor_example'; // string
$limit = 20; // int

try {
    $result = $apiInstance->tiktokSearchHashtagsGet($q, $cursor, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TiktokApi->tiktokSearchHashtagsGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
q string Search keyword
cursor string [optional]
limit int [optional] [default to 20]

Return type

\Unifapi\Sdk\Model\TiktokSearchHashtagsGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokSearchUsersGet()

tiktokSearchUsersGet($q, $cursor, $limit): \Unifapi\\Sdk\Model\TiktokSearchUsersGet200Response

Search TikTok users by keyword

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\TiktokApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$q = 'q_example'; // string | Search keyword
$cursor = 'cursor_example'; // string
$limit = 20; // int

try {
    $result = $apiInstance->tiktokSearchUsersGet($q, $cursor, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TiktokApi->tiktokSearchUsersGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
q string Search keyword
cursor string [optional]
limit int [optional] [default to 20]

Return type

\Unifapi\Sdk\Model\TiktokSearchUsersGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokSearchVideosGet()

tiktokSearchVideosGet($q, $cursor, $limit): \Unifapi\\Sdk\Model\TiktokHashtagsIdVideosGet200Response

Search TikTok videos by keyword

Returns a paginated list of TikTok videos matching the keyword q. Use next_cursor from the response as the next request's cursor.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\TiktokApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$q = 'q_example'; // string | Search keyword
$cursor = 'cursor_example'; // string
$limit = 20; // int

try {
    $result = $apiInstance->tiktokSearchVideosGet($q, $cursor, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TiktokApi->tiktokSearchVideosGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
q string Search keyword
cursor string [optional]
limit int [optional] [default to 20]

Return type

\Unifapi\Sdk\Model\TiktokHashtagsIdVideosGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokUsersIdFollowersGet()

tiktokUsersIdFollowersGet($id, $cursor, $limit): \Unifapi\\Sdk\Model\TiktokSearchUsersGet200Response

List a TikTok user's followers

Returns a paginated list of users following the given user.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\TiktokApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 'id_example'; // string | TikTok sec_uid, numeric user id, or public handle.
$cursor = 'cursor_example'; // string
$limit = 20; // int

try {
    $result = $apiInstance->tiktokUsersIdFollowersGet($id, $cursor, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TiktokApi->tiktokUsersIdFollowersGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string TikTok sec_uid, numeric user id, or public handle.
cursor string [optional]
limit int [optional] [default to 20]

Return type

\Unifapi\Sdk\Model\TiktokSearchUsersGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokUsersIdFollowingGet()

tiktokUsersIdFollowingGet($id, $cursor, $limit): \Unifapi\\Sdk\Model\TiktokSearchUsersGet200Response

List users a TikTok user is following

Returns a paginated list of users the given user is following.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\TiktokApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 'id_example'; // string | TikTok sec_uid, numeric user id, or public handle.
$cursor = 'cursor_example'; // string
$limit = 20; // int

try {
    $result = $apiInstance->tiktokUsersIdFollowingGet($id, $cursor, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TiktokApi->tiktokUsersIdFollowingGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string TikTok sec_uid, numeric user id, or public handle.
cursor string [optional]
limit int [optional] [default to 20]

Return type

\Unifapi\Sdk\Model\TiktokSearchUsersGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokUsersIdGet()

tiktokUsersIdGet($id): \Unifapi\\Sdk\Model\TiktokUsersIdGet200Response

Get a TikTok user profile

Returns the canonicalized public profile for the TikTok user with the given sec_uid, numeric user id, or handle.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\TiktokApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 'id_example'; // string | TikTok sec_uid, numeric user id, or public handle.

try {
    $result = $apiInstance->tiktokUsersIdGet($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TiktokApi->tiktokUsersIdGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string TikTok sec_uid, numeric user id, or public handle.

Return type

\Unifapi\Sdk\Model\TiktokUsersIdGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokUsersIdLikesGet()

tiktokUsersIdLikesGet($id, $cursor, $limit): \Unifapi\\Sdk\Model\TiktokHashtagsIdVideosGet200Response

List videos liked by a TikTok user

Returns a paginated list of videos the user has liked where the user has made their likes public.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\TiktokApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 'id_example'; // string | TikTok sec_uid, numeric user id, or public handle.
$cursor = 'cursor_example'; // string
$limit = 20; // int

try {
    $result = $apiInstance->tiktokUsersIdLikesGet($id, $cursor, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TiktokApi->tiktokUsersIdLikesGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string TikTok sec_uid, numeric user id, or public handle.
cursor string [optional]
limit int [optional] [default to 20]

Return type

\Unifapi\Sdk\Model\TiktokHashtagsIdVideosGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokUsersIdVideosGet()

tiktokUsersIdVideosGet($id, $cursor, $limit): \Unifapi\\Sdk\Model\TiktokHashtagsIdVideosGet200Response

List videos posted by a TikTok user

Returns a paginated list of public videos posted by the user. Use next_cursor from the response as the next request's cursor.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\TiktokApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 'id_example'; // string | TikTok sec_uid, numeric user id, or public handle.
$cursor = 'cursor_example'; // string
$limit = 20; // int

try {
    $result = $apiInstance->tiktokUsersIdVideosGet($id, $cursor, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TiktokApi->tiktokUsersIdVideosGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string TikTok sec_uid, numeric user id, or public handle.
cursor string [optional]
limit int [optional] [default to 20]

Return type

\Unifapi\Sdk\Model\TiktokHashtagsIdVideosGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokUsersResolveGet()

tiktokUsersResolveGet($username): \Unifapi\\Sdk\Model\TiktokUsersResolveGet200Response

Resolve a TikTok username to a user id

Accepts a public TikTok username (handle) and returns the user's stable opaque id for other /tiktok/users/{id} endpoints.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\TiktokApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$username = 'username_example'; // string | Public TikTok handle, e.g. 'jennmelon'

try {
    $result = $apiInstance->tiktokUsersResolveGet($username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TiktokApi->tiktokUsersResolveGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
username string Public TikTok handle, e.g. 'jennmelon'

Return type

\Unifapi\Sdk\Model\TiktokUsersResolveGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokVideosBatchPost()

tiktokVideosBatchPost($tiktok_videos_batch_post_request): \Unifapi\\Sdk\Model\TiktokFeedRecommendedPost200Response

Batch-fetch TikTok videos by ID

Returns canonicalized metadata for up to 20 TikTok videos.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\TiktokApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$tiktok_videos_batch_post_request = new \Unifapi\\Sdk\Model\TiktokVideosBatchPostRequest(); // \Unifapi\\Sdk\Model\TiktokVideosBatchPostRequest

try {
    $result = $apiInstance->tiktokVideosBatchPost($tiktok_videos_batch_post_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TiktokApi->tiktokVideosBatchPost: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
tiktok_videos_batch_post_request \Unifapi\Sdk\Model\TiktokVideosBatchPostRequest [optional]

Return type

\Unifapi\Sdk\Model\TiktokFeedRecommendedPost200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokVideosIdCommentsCommentIdRepliesGet()

tiktokVideosIdCommentsCommentIdRepliesGet($id, $comment_id, $cursor, $limit): \Unifapi\\Sdk\Model\TiktokVideosIdCommentsCommentIdRepliesGet200Response

List replies to a TikTok comment

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\TiktokApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 'id_example'; // string
$comment_id = 'comment_id_example'; // string
$cursor = 'cursor_example'; // string
$limit = 20; // int

try {
    $result = $apiInstance->tiktokVideosIdCommentsCommentIdRepliesGet($id, $comment_id, $cursor, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TiktokApi->tiktokVideosIdCommentsCommentIdRepliesGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string
comment_id string
cursor string [optional]
limit int [optional] [default to 20]

Return type

\Unifapi\Sdk\Model\TiktokVideosIdCommentsCommentIdRepliesGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokVideosIdCommentsGet()

tiktokVideosIdCommentsGet($id, $cursor, $limit): \Unifapi\\Sdk\Model\TiktokVideosIdCommentsCommentIdRepliesGet200Response

List top-level comments on a TikTok video

Returns a paginated list of top-level comments on the given video. Use next_cursor from the response as the next request's cursor.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\TiktokApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 'id_example'; // string
$cursor = 'cursor_example'; // string
$limit = 20; // int

try {
    $result = $apiInstance->tiktokVideosIdCommentsGet($id, $cursor, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TiktokApi->tiktokVideosIdCommentsGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string
cursor string [optional]
limit int [optional] [default to 20]

Return type

\Unifapi\Sdk\Model\TiktokVideosIdCommentsCommentIdRepliesGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokVideosIdGet()

tiktokVideosIdGet($id): \Unifapi\\Sdk\Model\TiktokVideosIdGet200Response

Get a TikTok video by ID

Returns canonicalized metadata for a single TikTok video. The {id} must be the numeric TikTok video id.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\TiktokApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 'id_example'; // string

try {
    $result = $apiInstance->tiktokVideosIdGet($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TiktokApi->tiktokVideosIdGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string

Return type

\Unifapi\Sdk\Model\TiktokVideosIdGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

tiktokVideosResolveGet()

tiktokVideosResolveGet($url): \Unifapi\\Sdk\Model\TiktokVideosIdGet200Response

Resolve a TikTok share URL to a video

Accepts a TikTok share URL (long or short / vm.tiktok.com) and returns the canonical Video object.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Unifapi\\Sdk\Api\TiktokApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$url = 'url_example'; // string | TikTok share URL (long or short form)

try {
    $result = $apiInstance->tiktokVideosResolveGet($url);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TiktokApi->tiktokVideosResolveGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
url string TikTok share URL (long or short form)

Return type

\Unifapi\Sdk\Model\TiktokVideosIdGet200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]