通过 auth_token 获取登录用户信息
验证 auth_token 并返回对应推特账号的基础信息。
返回 API 接口列表
/Cookie Endpoints
GET
/twitter/{auth_token}/user_infoAPI 鉴权
AuthorizationBearer token · header必填TwexAPI 平台的全局身份凭据 (Bearer Token)。所有接口调用均需在 Header 中携带:Authorization: Bearer <YOUR_TWEXAPI_KEY>。可在 TwexAPI 用户控制台获取。
路径参数
auth_tokenstring必填目标 Twitter 账号的已登录 auth_token 字符串(来自浏览器 Cookie)
响应结果
200推特账号公开资料与基础信息
codeinteger必填HTTP 响应状态码(200 表示成功)
msgstring必填响应提示信息(例如 'success')
dataUserInfo | any必填接口返回的核心业务数据载荷
展开属性折叠属性
Any of:
UserInfo
userIdstring必填用户唯一数字 ID
isBlueVerifiedboolean必填推特蓝 V 认证详细状态
createdAtstring必填推特账号注册日期(格式如 'Wed May 23 2012')
createdAtDatetimestring | anyISO 8601 标准格式的账号注册时间
展开属性折叠属性
Any of:
string
stringany
anydefaultProfileboolean必填标记该用户是否仍在使用推特默认个人资料设置
defaultProfileImageboolean必填标记该用户是否仍在使用推特默认头像(蛋头头像)
descriptionstring必填个人主页 Bio 自我介绍文本
locationstring必填用户在个人主页填写的所在地/国家地区
fastFollowersCountinteger必填活跃优质粉丝总数
favouritesCountinteger必填用户累计点赞过的推文总数
followersCountinteger必填该账号的粉丝总数
followingCountinteger必填该账号正在关注的博主总数
hasCustomTimelinesboolean必填标记该账号是否配置了个性化自定义时间线
isTranslatorboolean必填标记该用户是否为推特官方认证译者
listedCountinteger必填被推特用户收录进公开列表的累计次数
mediaCountinteger必填用户发布的图片与视频推文总数
namestring必填用户昵称/显示名称
normalFollowersCountinteger必填普通粉丝总数
pinnedTweetIdsStrany[] | any该用户个人主页置顶的推文 ID 列表
展开属性折叠属性
Any of:
any[]
Array of
anyanyany
anypossiblySensitiveboolean必填标记该内容是否可能包含敏感或限制级信息
profileImageUrlHttpsstring必填用户头像图片访问 URL 地址
usernamestring必填Username
statusesCountinteger必填该账号累计发表的推文总数量
translatorTypestring | any推特译者认证类型标识
展开属性折叠属性
Any of:
string
stringany
anyverifiedboolean必填是否通过推特官方实名/身份认证
verified_typestring | any推特官方认证徽章类型(blue 个人蓝 V、business 企业金 V、government 政府灰 V 等)
展开属性折叠属性
Any of:
string
stringany
anywithheldInCountriesany[] | any因各国当地法律合规原因在特定国家/地区被屏蔽隐藏的国家代码列表
展开属性折叠属性
Any of:
any[]
Array of
anyanyany
anyprotectedboolean必填是否为推特私密锁推账号(保护模式,仅已批准粉丝可见)
urlstring | any用户在个人主页填写的对外链接 URL
展开属性折叠属性
Any of:
string
stringany
anydescriptionUrlsany[] | any个人简介 Bio 中嵌入的超链接列表
展开属性折叠属性
Any of:
any[]
Array of
anyanyany
anyurlsany[] | any用户个人资料中关联的所有外部链接列表
展开属性折叠属性
Any of:
any[]
Array of
anyanyany
anypinnedTweetIdsany[] | any该用户个人主页置顶的推文 ID 列表
展开属性折叠属性
Any of:
any[]
Array of
anyanyany
anyany
any422请求参数校验错误
detailValidationError[]展开属性折叠属性
Array of
ValidationErrorlocstring | integer[]必填展开属性折叠属性
Array of
string | integerAny of:
string
stringinteger
integermsgstring必填响应提示信息(例如 'success')
typestring必填inputanyctxobject⚡交互式测试GET
⚡交互式测试 / Try APIGETLive Console
🌐目标服务器:
https://api.twexapi.io● 生产环境就绪
✍️
写入接口凭证指引(TwexAPI 密钥 + 目标推特 Cookie)
1. TwexAPI 平台密钥 (Bearer Token):在下方「API 鉴权」中填入,用于 TwexAPI 计费与接口调用鉴权。
2. 推特账号 Cookie:本接口为代发/点赞/关注等写操作,需在下方请求体 (Request Body) 的 cookie 字段中填入目标 Twitter 账号的 Cookie 凭据(如 auth_token=...; ct0=...)。
🔑API 鉴权
⚙️请求参数 (1)
📡
暂无响应数据
请在「请求配置」中确认参数后,点击底部的「发送请求」按钮。
请求示例
curl -X GET "https://api.twexapi.io/twitter/string/user_info" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://api.twexapi.io/twitter/string/user_info", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});import requests
response = requests.get(
"https://api.twexapi.io/twitter/string/user_info",
headers={
"Authorization": "Bearer YOUR_TOKEN"
},
)响应示例
{
"code": 0,
"msg": "string",
"data": {
"userId": "string",
"isBlueVerified": true,
"createdAt": "string",
"createdAtDatetime": "string",
"defaultProfile": true,
"defaultProfileImage": true,
"description": "string",
"location": "string",
"fastFollowersCount": 0,
"favouritesCount": 0,
"followersCount": 0,
"followingCount": 0,
"hasCustomTimelines": true,
"isTranslator": true,
"listedCount": 0,
"mediaCount": 0,
"name": "string",
"normalFollowersCount": 0,
"pinnedTweetIdsStr": [
null
],
"possiblySensitive": true,
"profileImageUrlHttps": "string",
"username": "string",
"statusesCount": 0,
"translatorType": "string",
"verified": true,
"verified_type": "blue",
"withheldInCountries": [
null
],
"protected": true,
"url": "string",
"descriptionUrls": [
null
],
"urls": [
null
],
"pinnedTweetIds": [
null
]
}
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}