Versions in this module Expand all Collapse all v1 v1.1.0 Sep 16, 2026 Changes in this version + const DEFAULT_EVENTS_CHAN_SIZE + const USER_FOLLOW + const USER_JOIN + const USER_SHARE + var Direct = direct + var ErrCaptcha = errors.New("captcha detected, unable to proceed") + var ErrFFMPEGNotFound = errors.New("please install ffmpeg before downloading") + var ErrLiveHasEnded = errors.New("livestream has ended") + var ErrMsgNotImplemented = errors.New("message protobuf type has not been implemented, please report") + var ErrNoMoreFeedItems = errors.New("no more feed items available") + var ErrRateLimitExceeded = errors.New("you have exceeded the rate limit, please wait a few min") + var ErrURLNotFound = errors.New("unable to download stream, URL not found") + var ErrUserInfoNotFound = errors.New("user info not found") + var ErrUserNotFound = errors.New("user not found") + var ErrUserOffline = errors.New("user might be offline, Room ID not found") + var HttpsDialer = httpsDialer + var TlsConfig = &tls.Config + func DisableSigningLimitsValidation(t *TikTok) error + func EnableExperimentalEvents(t *TikTok) error + func EnableExtraWebCastDebug(t *TikTok) error + func FromEnvironment() proxy.Dialer + func FromURL(u *url.URL, forward proxy.Dialer) (proxy.Dialer, error) + type BadgeAttributes struct + Badges []*UserBadge + type Battle struct + Groups []*BattleGroup + Host int64 + type BattleGroup struct + Points int + Users []*User + type BattlesEvent struct + Battles []*Battle + MessageID int64 + Status int + Timestamp int64 + func (b BattlesEvent) CreatedTimestamp() int64 + func (b BattlesEvent) IsHistory() bool + type ChatEvent struct + Comment string + MessageID int64 + Timestamp int64 + User *User + UserIdentity *UserIdentity + func (c ChatEvent) CreatedTimestamp() int64 + func (c ChatEvent) IsHistory() bool + type ControlEvent struct + Action int + Description string + MessageID int64 + Timestamp int64 + func (c ControlEvent) CreatedTimestamp() int64 + func (c ControlEvent) IsHistory() bool + func (c ControlEvent) TimeComparableID() int64 + type DisconnectEvent struct + func (d DisconnectEvent) CreatedTimestamp() int64 + func (d DisconnectEvent) IsHistory() bool + type ErrIPBlockedOrBanned struct + func (e ErrIPBlockedOrBanned) Error() string + type Event interface + CreatedTimestamp func() int64 + IsHistory func() bool + type ExtraAttributes struct + FollowRole int + type Feed struct + HasMore bool + LiveStreams []*LiveStream + func (f *Feed) Next() (*FeedItem, error) + type FeedItem struct + Extra struct{ ... } + LiveStreams []*LiveStream + StatusCode int + type GiftEvent struct + Describe string + Diamonds int + GroupID int64 + ID int64 + IsComboGift bool + MessageID int64 + Name string + RepeatCount int + RepeatEnd bool + Timestamp int64 + ToUserID int64 + Type int + User *User + UserIdentity *UserIdentity + func (g GiftEvent) CreatedTimestamp() int64 + func (g GiftEvent) IsHistory() bool + type GiftInfo struct + DoodleTemplates []interface{} + Gifts []struct{ ... } + GiftsInfo struct{ ... } + Pages []interface{} + type IntroEvent struct + ID int + MessageID int64 + Timestamp int64 + Title string + User *User + func (i IntroEvent) CreatedTimestamp() int64 + func (i IntroEvent) IsHistory() bool + func (i IntroEvent) TimeComparableID() int64 + type LikeEvent struct + DisplayType string + Label string + Likes int + MessageID int64 + Timestamp int64 + TotalLikes int + User *User + func (l LikeEvent) CreatedTimestamp() int64 + func (l LikeEvent) IsHistory() bool + type LimitInfo struct + Max int + Remaining int + ResetAt time.Time + type Live struct + Events chan Event + GiftInfo *GiftInfo + ID string + Info *RoomInfo + func (l *Live) Close() + func (l *Live) DownloadStream(file ...string) error + type LiveRoom struct + CoverURL string + GameTagID int + HashTagID int + HevcStreamData StreamData + LiveRoomMode int + LiveRoomStats LiveRoomStats + LiveSubOnly int + MultiStreamScene int + MultiStreamSource int + PaidEvent PaidEvent + SquareCoverImg string + StartTime int64 + Status int + StreamData StreamData + StreamID string + Title string + type LiveRoomStats struct + UserCount int + type LiveRoomUser struct + AvatarLarger string + AvatarMedium string + AvatarThumb string + FollowStatus int + ID string + Nickname string + RoomID string + SecUID string + Secret bool + Signature string + Status int + UniqueID string + Verified bool + type LiveRoomUserInfo struct + LiveRoom *LiveRoom + LiveRoomUser *LiveRoomUser + Stats Stats + type LiveStream struct + DebugInfo string + FlareInfo struct{ ... } + IsPseudoLiving bool + IsRecommendCard bool + LiveReason string + Rid string + Room *RoomInfo + Type int + func (s *LiveStream) Track() (*Live, error) + type MicBattleEvent struct + MessageID int64 + Timestamp int64 + Users []*User + func (m MicBattleEvent) CreatedTimestamp() int64 + func (m MicBattleEvent) IsHistory() bool + type Options struct + DefaultQuality Quality + Qualities []Quality + ShowQualityButton bool + type PaidEvent struct + EventID int + PaidType int + type PriceItem struct + CouponID string + CurrencyPrice []struct{ ... } + Describe string + DiamondCount int + DiscountPrice int + ExchangePrice int + GivingCount int + ID int + IapID string + Price int + type PriceList struct + Extra struct{ ... } + PriceList []*PriceItem + StatusCode int + type ProfilePicture struct + Urls []string + type PullData struct + Options Options + StreamData string + type Quality struct + IconType int + Level int + Name string + Resolution string + SdkKey string + VCodec string + type QuestionEvent struct + MessageID int64 + Quesion string + Timestamp int64 + User *User + func (q QuestionEvent) CreatedTimestamp() int64 + func (q QuestionEvent) IsHistory() bool + type RankList struct + AnchorShowContribution bool + Anonymous int + Currency string + Ranks []*RankUser + RuleURL string + Total int + type RankUser struct + GapDescription string + Rank int + Score int + User *UserData + UserRestrictionLevel int + type RoomBannerEvent struct + Data interface{} + MessageID int64 + Timestamp int64 + func (r RoomBannerEvent) CreatedTimestamp() int64 + func (r RoomBannerEvent) IsHistory() bool + type RoomEvent struct + Message string + MessageID int64 + Timestamp int64 + Type string + func (r RoomEvent) CreatedTimestamp() int64 + func (r RoomEvent) IsHistory() bool + type RoomInfo struct + AdminUserIds []interface{} + AnchorABMap interface{} + AnchorScheduledTimeText string + AnchorShareText string + AnchorTabType float64 + AnsweringQuestionContent string + AppID float64 + AutoCover float64 + BookEndTime float64 + BookTime float64 + BusinessLive float64 + ChallengeInfo string + ClientVersion float64 + CommentNameMode float64 + CommerceInfo struct{ ... } + CommonLabelList string + ContentTag string + Cover struct{ ... } + CreateTime int64 + DecoList []interface{} + DisablePreloadStream bool + FansclubMsgStyle float64 + FeedRoomLabel struct{ ... } + FeedRoomLabels []interface{} + FilterMsgRules []interface{} + FinishReason float64 + FinishTime float64 + FinishURL string + FinishURLV2 string + FollowMsgStyle float64 + ForumExtraData string + GameTag []interface{} + GiftMsgStyle float64 + GiftPollVoteEnabled bool + GroupSource float64 + HasCommerceGoods bool + Hashtag struct{ ... } + HaveWishlist bool + HotSentenceInfo string + ID int64 + IDStr string + InteractionQuestionVersion float64 + Introduction string + IsGatedRoom bool + IsReplay bool + IsShowUserCardSwitch bool + LastPingTime float64 + Layout float64 + LikeCount float64 + LinkMic struct{ ... } + LinkerMap struct{} + LinkmicLayout float64 + LiveDistribution []interface{} + LiveID float64 + LiveReason string + LiveRoomMode float64 + LiveTypeAudio bool + LiveTypeLinkmic bool + LiveTypeNormal bool + LiveTypeSandbox bool + LiveTypeScreenshot bool + LiveTypeSocialLive bool + LiveTypeThirdParty bool + LivingRoomAttrs struct{ ... } + LotteryFinishTime float64 + MosaicStatus float64 + OsType float64 + Owner *UserData + OwnerDeviceID float64 + OwnerDeviceIDStr string + OwnerUserID float64 + OwnerUserIDStr string + PreEnterTime float64 + PreviewFlowTag float64 + RanklistAudienceType float64 + RelationTag string + Replay bool + RoomAuditStatus float64 + RoomAuth struct{ ... } + RoomCreateAbParam string + RoomLayout float64 + RoomStickerList []interface{} + RoomTabs []interface{} + RoomTag float64 + ScrollConfig string + SearchID float64 + ShareMsgStyle float64 + ShareURL string + ShortTitle string + ShortTouchItems []interface{} + SocialInteraction struct{ ... } + StartTime float64 + Stats struct{ ... } + Status float64 + StickerList []interface{} + StreamID int64 + StreamIDStr string + StreamURL struct{ ... } + StreamURLFilteredInfo struct{ ... } + Title string + TopFans []*TopFan + UseFilter bool + UserCount int + UserShareText string + VideoFeedTag string + WebcastCommentTcs float64 + WebcastSdkVersion float64 + WithDrawSomething bool + WithKtv bool + WithLinkmic bool + type SignedURL struct + BrowserName string + BrowserVersion string + Error string + MsToken string + Signature string + SignedURL string + UserAgent string + XBogus string + type SigningLimits struct + Code int + Day LimitInfo + Hour LimitInfo + Message string + Minute LimitInfo + func GetSignerLimits(signer string, apiKey string) (SigningLimits, error) + type Stats struct + FollowerCount int + FollowingCount int + type StreamData struct + PullData PullData + type TikTok struct + Debug bool + LogRequests bool + func NewTikTok(options ...TikTokLiveOption) (*TikTok, error) + func NewTikTokWithApiKey(clientName, apiKey string, options ...TikTokLiveOption) (*TikTok, error) + func (t *TikTok) GetLiveRoomUserInfo(user string) (LiveRoomUserInfo, error) + func (t *TikTok) GetPriceList() (*PriceList, error) + func (t *TikTok) GetRoomInfo(username string) (*RoomInfo, error) + func (t *TikTok) GetUserInfo(user string) (LiveRoomUser, error) + func (t *TikTok) IsLive(info LiveRoomUserInfo) (bool, error) + func (t *TikTok) NewFeed() *Feed + func (t *TikTok) SetDebugHandler(f func(...interface{})) + func (t *TikTok) SetErrorHandler(f func(...interface{})) + func (t *TikTok) SetInfoHandler(f func(...interface{})) + func (t *TikTok) SetWarnHandler(f func(...interface{})) + func (t *TikTok) TrackRoom(roomId string) (*Live, error) + func (t *TikTok) TrackUser(username string) (*Live, error) + type TikTokLiveOption func(t *TikTok) error + func EnableWSTrace(file string) TikTokLiveOption + func Proxy(url string, insecure bool) TikTokLiveOption + func SigningApiKey(apiKey string) TikTokLiveOption + func SigningUrl(url string) TikTokLiveOption + type TopFan struct + FanTicket float64 + User *UserData + type User struct + Badge *BadgeAttributes + DisplayID string + ExtraAttributes *ExtraAttributes + ID int64 + Nickname string + ProfilePicture *ProfilePicture + Username string + type UserBadge struct + Name string + Type string + type UserData struct + AllowFindByContacts bool + AllowOthersDownloadVideo bool + AllowOthersDownloadWhenSharingVideo bool + AllowShareShowProfile bool + AllowShowInGossip bool + AllowShowMyAction bool + AllowStrangeComment bool + AllowUnfollowerComment bool + AllowUseLinkmic bool + AvatarLarge struct{ ... } + AvatarMedium struct{ ... } + AvatarThumb struct{ ... } + BadgeImageList []interface{} + BadgeList []interface{} + BgImgURL string + BioDescription string + BlockStatus int + BorderList []interface{} + CommentRestrict int + CommerceWebcastConfigIds []interface{} + Constellation string + CreateTime int + DisableIchat int + EnableIchatImg int + Exp int + FanTicketCount int + FoldStrangerChat bool + FollowInfo struct{ ... } + FollowStatus int + ID int64 + IDStr string + IchatRestrictType int + IsFollower bool + IsFollowing bool + LinkMicStats int + MediaBadgeImageList []interface{} + ModifyTime int + NeedProfileGuide bool + NewRealTimeIcons []interface{} + Nickname string + OwnRoom struct{ ... } + PayGrade struct{ ... } + PayScore int + PayScores int + PushCommentStatus bool + PushDigg bool + PushFollow bool + PushFriendAction bool + PushIchat bool + PushStatus bool + PushVideoPost bool + PushVideoRecommend bool + RealTimeIcons []interface{} + SecUID string + Secret int + ShareQrcodeURI string + SpecialID string + Status int + TicketCount int + TopFans []interface{} + TopVipNo int + UserAttr struct{ ... } + UserRole int + Username string + Verified bool + VerifiedContent string + VerifiedReason string + WithCarManagementPermission bool + WithCommercePermission bool + WithFusionShopEntry bool + type UserEvent struct + Event userEventType + MessageID int64 + Timestamp int64 + User *User + func (u UserEvent) CreatedTimestamp() int64 + func (u UserEvent) IsHistory() bool + type UserIdentity struct + IsAnchor bool + IsFollower bool + IsGiftGiver bool + IsModerator bool + IsMutualFollowing bool + IsSubscriber bool + type UserInfo struct + AvatarLarger string + AvatarMedium string + AvatarThumb string + BioLink struct{ ... } + Biography string + CommentSetting int + CreateTime int + DuetSetting int + Ftc bool + ID string + IsADVirtual bool + Nickname string + OpenFavorite bool + PrivateAccount bool + Relation int + RoomID string + SecUID string + Secret bool + ShortID string + Stats UserStats + StitchSetting int + UniqueID string + Verified bool + type UserNotFound struct + func (u UserNotFound) Error() string + type UserStats struct + DiggCount int + FollowerCount int + FollowingCount int + Heart int + HeartCount int + NeedFix bool + VideoCount int + type ViewersEvent struct + MessageID int64 + Timestamp int64 + Viewers int + func (v ViewersEvent) CreatedTimestamp() int64 + func (v ViewersEvent) IsHistory() bool + func (v ViewersEvent) TimeComparableID() int64