Wechat-MP-V2/微信公众号V2
获取微信公众号资料页
POST
https://api.getoneapi.com/api/wechat-mp-v2/fetch_mp_profile返回公众号资料页:名称 / 头像 / 简介 / 认证主体类型等。
部分账号(如示例号)字段稀疏,nick_name / signature / head_url 可能为 null。
由于微信服务器原因,本接口响应较慢,请将客户端请求超时(timeout)设置为 30 秒;timeout 设置过小会造成已扣费但收不到响应的情况。
请求参数
Header 参数
Authorization
string
必需
在 Header 添加参数 Authorization,其值为在 Bearer 之后拼接 apikey
默认值:
Bearer YOUR_API_KEY
Content-Type
string
必需
默认值:
application/json
Body 参数
application/jsonusername
string
公众号原始ID
必需
gh_… 示例:gh_d29e0d22a6f9。来源:文章详情 content.user_name
raw
boolean
可选
可选,默认 true。true=原始;false=精简解析。
示例
{
"username" : "gh_d29e0d22a6f9",
"raw" : true
}返回响应
响应 200
application/jsoncode
integer
必需
message
string
必需
data
object
必需
示例
{
"code" : 200,
"message" : "success",
"data" : { }
}请求示例代码
替换 YOUR_API_KEY、参数占位符与请求数据后使用。第三方客户端需先安装对应依赖。
curl --globoff --request POST 'https://api.getoneapi.com/api/wechat-mp-v2/fetch_mp_profile' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"username" : "gh_d29e0d22a6f9",
"raw" : true
}'