net3000.tiktok
1.0.0
dotnet add package net3000.tiktok --version 1.0.0
NuGet\Install-Package net3000.tiktok -Version 1.0.0
<PackageReference Include="net3000.tiktok" Version="1.0.0" />
<PackageVersion Include="net3000.tiktok" Version="1.0.0" />
<PackageReference Include="net3000.tiktok" />
paket add net3000.tiktok --version 1.0.0
#r "nuget: net3000.tiktok, 1.0.0"
#:package net3000.tiktok@1.0.0
#addin nuget:?package=net3000.tiktok&version=1.0.0
#tool nuget:?package=net3000.tiktok&version=1.0.0
Net3000.TikTok
Overview
The Net3000.TikTok library provides comprehensive integration with the TikTok API for Net3000 solutions. This library enables video uploads, channel feed retrieval, and TikTok content management.
Features
- Video Upload: Upload videos directly to TikTok with customizable privacy settings
- Feed Retrieval: Retrieve video lists from a user's TikTok channel
- Video Information: Get detailed information about specific videos
- Upload Status: Check the processing status of uploaded videos
- Privacy Controls: Configure comment, duet, and stitch settings for uploads
Installation
dotnet add package net3000.tiktok
Dependencies
net3000.common(v9.0.11)net3000.common.models(v1.0.7)
Configuration
Add your TikTok API credentials to your configuration:
{
"TikTok": {
"ClientKey": "your-client-key",
"ClientSecret": "your-client-secret",
"ApiVersion": "v2"
}
}
Authentication
TikTok uses OAuth 2.0 for authentication. You'll need to:
- Register your application at TikTok Developer Portal
- Implement OAuth flow to obtain user access tokens
- Set the
AccessTokenandOpenIdproperties before making API calls
Required Scopes
video.upload- For uploading videosvideo.list- For retrieving video listsuser.info.basic- For accessing user information
Usage
Basic Setup
using net3000.tiktok;
// Initialize the service
var tiktokService = new lib(configuration);
// Set credentials (obtained through OAuth)
tiktokService.AccessToken = "user-access-token";
tiktokService.OpenId = "user-open-id";
Uploading Videos
// Read video file
byte[] videoData = File.ReadAllBytes("path/to/video.mp4");
// Upload with settings
var uploadResult = await tiktokService.UploadVideo(
videoData: videoData,
title: "My Awesome Video!",
description: "Check out this amazing content",
privacyLevel: "PUBLIC_TO_EVERYONE",
disableComment: false,
disableDuet: false,
disableStitch: false
);
if (uploadResult.success)
{
var publishId = uploadResult.data.publish_id;
Console.WriteLine($"Video uploaded! Publish ID: {publishId}");
// Check upload status
var statusResult = await tiktokService.CheckVideoStatus(publishId);
if (statusResult.success)
{
Console.WriteLine($"Status: {statusResult.data.data.status}");
}
}
Retrieving Channel Videos
// Get user's videos
var videosResult = await tiktokService.GetUserVideos(maxCount: 20);
if (videosResult.success)
{
foreach (var video in videosResult.data.data.videos)
{
Console.WriteLine($"Video ID: {video.id}");
Console.WriteLine($"Title: {video.title}");
Console.WriteLine($"Views: {video.view_count}");
Console.WriteLine($"Likes: {video.like_count}");
Console.WriteLine($"Share URL: {video.share_url}");
Console.WriteLine($"Created: {video.CreatedDate}");
Console.WriteLine("---");
}
// Pagination
if (videosResult.data.data.has_more)
{
var nextCursor = videosResult.data.data.cursor;
var nextPage = await tiktokService.GetUserVideos(maxCount: 20, cursor: nextCursor);
}
}
Getting Video Details
// Get detailed information about a specific video
var videoInfo = await tiktokService.GetVideoInfo("video-id-here");
if (videoInfo.success)
{
var video = videoInfo.data;
Console.WriteLine($"Title: {video.title}");
Console.WriteLine($"Duration: {video.duration} seconds");
Console.WriteLine($"Resolution: {video.width}x{video.height}");
Console.WriteLine($"Description: {video.video_description}");
Console.WriteLine($"Engagement: {video.like_count} likes, {video.comment_count} comments");
}
Alternative Setup (Without Configuration)
// Initialize without configuration
var tiktokService = new lib();
// Set credentials manually
tiktokService.ClientKey = "your-client-key";
tiktokService.ClientSecret = "your-client-secret";
tiktokService.AccessToken = "user-access-token";
tiktokService.OpenId = "user-open-id";
tiktokService.ApiVersion = "v2";
API Reference
lib (Main Service Class)
Main service class for TikTok API integration.
Properties
AccessToken- TikTok user access token (required for all operations)ClientKey- TikTok application client keyClientSecret- TikTok application client secretApiVersion- API version (default: "v2")OpenId- TikTok Open ID (user identifier)
Methods
UploadVideo
Uploads a video to TikTok.
Parameters:
videoData(byte[]) - Video file as byte arraytitle(string) - Video title/caption (required)description(string?) - Video description (optional)privacyLevel(string) - Privacy level: "PUBLIC_TO_EVERYONE", "MUTUAL_FOLLOW_FRIENDS", "SELF_ONLY"disableComment(bool) - Whether to disable commentsdisableDuet(bool) - Whether to disable duetdisableStitch(bool) - Whether to disable stitch
Returns: apiResponse<VideoUploadResponse>
GetUserVideos
Retrieves video list from user's channel.
Parameters:
maxCount(int) - Maximum number of videos to retrieve (default: 20, max: 20)cursor(long?) - Cursor for pagination (optional)
Returns: apiResponse<VideoListResponse>
GetVideoInfo
Retrieves detailed information about a specific video.
Parameters:
videoId(string) - TikTok video ID
Returns: apiResponse<VideoInfo>
CheckVideoStatus
Checks the processing status of an uploaded video.
Parameters:
publishId(string) - Publish ID returned from UploadVideo
Returns: apiResponse<VideoStatusResponse>
Models
VideoInfo
Contains detailed information about a TikTok video.
Properties:
id- Unique video identifiertitle- Video titlevideo_description- Video description/captionshare_url- Shareable URLcover_image_url- Cover image URLduration- Duration in secondswidth/height- Video dimensionsview_count- Number of viewslike_count- Number of likescomment_count- Number of commentsshare_count- Number of sharescreate_time- Creation timestamp (Unix)CreatedDate- Creation date (DateTime)
VideoUploadResponse
Contains information about an uploaded video.
Properties:
publish_id- Unique identifier for tracking upload statusupload_url- URL where video was uploaded
VideoListResponse
Contains a list of videos and pagination information.
Properties:
data.videos- List of VideoInfo objectsdata.cursor- Cursor for next pagedata.has_more- Whether more results exist
VideoStatusData
Contains upload processing status.
Properties:
status- Status: "PUBLISH_COMPLETE", "PROCESSING_UPLOAD", "FAILED", etc.fail_reason- Failure reason (if applicable)publicly_available_post_id- Video ID after publishing completes
Privacy Levels
PUBLIC_TO_EVERYONE- Anyone can view the videoMUTUAL_FOLLOW_FRIENDS- Only mutual followers can viewSELF_ONLY- Only the creator can view (private)
Upload Status Values
PROCESSING_UPLOAD- Video is being processedPUBLISH_COMPLETE- Video is published and availableFAILED- Upload or processing failed
Error Handling
The library provides comprehensive error handling with detailed error messages from the TikTok API. All methods return apiResponse<T> objects with success/failure status and detailed error information.
Common errors:
- Missing access token or Open ID
- Invalid video format or size
- Insufficient API permissions
- Rate limit exceeded
- Network errors
Rate Limiting
TikTok API has rate limits. The library respects these limits but does not implement automatic retry logic. Monitor response headers and implement appropriate backoff strategies in your application.
Video Requirements
- Format: MP4, WebM, or MOV
- Size: Maximum 4GB
- Duration: 3 seconds to 10 minutes (varies by account type)
- Resolution: Minimum 720p recommended, maximum 4K
- Aspect Ratio: 9:16 (portrait) recommended
Testing
- Create a TikTok developer account
- Register your application
- Use test accounts for development
- Test uploads with small video files first
Best Practices
- Always check
apiResponse.successbefore accessing data - Implement OAuth token refresh logic
- Handle rate limiting gracefully
- Validate video files before upload
- Use appropriate privacy levels
- Monitor upload status for long videos
License
This library is proprietary to Net3000. Usage is restricted to Net3000.ca solutions and authorized affiliates. Redistribution, sublicensing, or integration with third-party products outside the Net3000 ecosystem is prohibited without written consent from Net3000.
Support
For support and questions, contact the Net3000 development team or visit net3000.ca.
Related Resources
Changelog
v1.0.0
- Initial release with TikTok API integration
- Video upload functionality
- Channel feed retrieval
- Video information queries
- Upload status tracking
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- net3000.common (>= 10.0.19)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on net3000.tiktok:
| Package | Downloads |
|---|---|
|
net3000.servicecoordinator
Service coordination library for Net3000 solutions. Provides API connection management and service orchestration capabilities. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 185 | 6/30/2026 |
Initial release of Net3000 TikTok library with API integration for video upload and feed retrieval.