namestringbắt buộc
WeChat Official Account name used to fetch basic profile information.
https://api.sandbase.ai/v1/api/wechat-mp/account-basic-infoGet basic profile information for a WeChat Official Account by account name. Use it to identify or enrich a known account before article, ownership, or publishing research.
Đầu ra của bạn sẽ xuất hiện ở đây
Hoàn tất đầu vào, rồi nhấp Run.
Returns the basic public profile of a WeChat Official Account: its name, description, avatar, account type, WeChat ID and biz identifier. It needs one input, the account name in name.
wxid before further research.biz value of an account so you can match it against article links.curl -X POST "https://api.sandbase.ai/v1/api/wechat-mp/account-basic-info" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "人民日报"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | WeChat Official Account name used to fetch basic profile information. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"avatar": "http://mmbiz.qpic.cn/mmbiz_png/xrFYciaHL08D1hiaVU0brP9YwQH1wFm9D9AG7oAVaNE8RzGia…",
"biz": "MjM5MjAxNDM4MA==",
"desc": "参与、沟通、记录时代。",
"name": "人民日报",
"type": "订阅号",
"wxid": "rmrbwx"
}
}
| Field | Meaning |
|---|---|
data.name | The display name of the Official Account. |
data.wxid | The WeChat ID of the account, for example rmrbwx. |
data.biz | The biz identifier of the account. The value looks like a Base64 string, for example MjM5MjAxNDM4MA==. |
data.desc | The account's profile description, as the account owner wrote it. |
data.type | The account type as a text label. The sample value 订阅号 means subscription account. |
data.avatar | URL of the account's avatar image. |
name. The sample request uses 人民日报.biz and wxid from the response to identify the account in later calls.$0.142857 per successful call. Failed calls are not charged.
Bắt đầu xây dựng
Endpoint API của nền tảng với xác thực và theo dõi mức sử dụng thống nhất.
curl -X POST "https://api.sandbase.ai/v1/api/wechat-mp/account-basic-info" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "人民日报"
}'Đặt SandBase API key của bạn trong môi trường máy chủ. Các request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key của bạn trên máy chủ. Không hiển thị trong mã chạy trên trình duyệt.
namestringbắt buộcWeChat Official Account name used to fetch basic profile information.
Đây là phản hồi ví dụ đã lưu cho API này; không có request thực nào được gửi khi xem mục này.
Chưa có phản hồi đã lưu nào được công bố. Chạy API trong Playground để xem phản hồi.
Khám phá thêm
| API | Giá | Phản hồi |
|---|---|---|
WeChat MP Account Basic InfoAPI này WeChat MP | $0.142857 mỗi lần gọi | JSON |
WeChat MP | $0.042857 mỗi lần gọi | JSON |
WeChat MP | $0.028571 mỗi lần gọi | JSON |
WeChat MP | $0.021429 mỗi lần gọi | JSON |
WeChat MP | $0.021429 mỗi lần gọi | JSON |
WeChat MP | $0.014286 mỗi lần gọi | JSON |
Câu hỏi
Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/wechat-mp/account-basic-info với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.
$0.142857 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.
Bắt buộc: name (string). Bảng Parameters và Playground trên trang này liệt kê mọi trường.
Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.
Không. WeChat MP Account Basic Info chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của WeChat MP.