查询用户信息
请求
HTTP URL | https://open.tiktokapis.com/v2/research/user/info/ |
HTTP 请求方法 | POST |
权限范围 | research.data.basic (必要权限) |
请求头
Key | 类型 | 描述 | 示例值 |
Authorization | 字符串 (String) | 通过 /v2/oauth/token/ 获取的客户端访问令牌。 | Bearer clt.example12345Example12345Example |
查询参数
Key | 类型 | 描述 | 示例 | 是否必填 |
fields | 字符串 (String) | 需返回的数据字段。以半角逗号分隔多个字段。 有关值的完整列表,请参见下方的“User Info 对象”。 | 完整列表: display_name, bio_description, avatar_url, is_verified, follower_count, following_count, likes_count, video_count,bio_url | 是 |
请求体参数
Key | 类型 | 描述 | 示例值 |
username | 字符串 (String) | 用作唯一标识符的用户名。 | "joe11235" |
示例
curl -L 'https://open.tiktokapis.com/v2/research/user/info/?fields=display_name,bio_description,avatar_url,is_verified,follower_count,following_count,likes_count,video_count' \
-H 'Authorization: Bearer clt.example12345Example12345Example' \
-H 'Content-Type:application/json' \
-d '{"username": "joe123456"}'响应
响应体
Key | 类型 | 描述 |
data | User Info 对象 | 返回的用户信息。 |
error | ErrorStructV2 | Error 对象。 |
User Info 对象
字段 | 类型 | 描述 |
"display_name" | 字符串 (String) | 用户的显示名称/昵称。 |
"bio_description" | 字符串 (String) | 用户的个人简介描述。 |
"avatar_url" | 字符串 (String) | 用户图片头像的 URL。 |
"is_verified" | 布尔值 (Boolean) | 用户的验证状态。如果用户已验证,则值为 true,否则为 false。 |
"following_count" | 整数 (int) | 用户关注的账号数量。 |
"follower_count" | 整数 (int) | 用户的粉丝数量。 |
"video_count" | 整数 (int) | 用户发布的视频数量。 |
"likes_count" | 整数 (int) | 用户累计总获赞数。 |
"bio_url" | 字符串 (String) | 分享时,用户个人简介中的链接。 |
示例
{
"data": {
"bio_description": "my_bio",
"is_verified": false,
"likes_count": 27155089,
"video_count": 44,
"avatar_url": "https://some_cdn.com/my_avatar",
"follower_count": 232,
"following_count": 45,
"display_name": "my nick name"
},
"error": {
"code": "ok",
"message": "",
"log_id": "202207280326050102231031430C7E754E",
}
}