channel_idstringจำเป็น
Channel ID (`sph…` short ID), e.g. `sphi9BjV8GK0Zsl` (People's Daily). Must start with `sph`.
https://api.sandbase.ai/v1/api/wechat-channels/v2/channel-id-to-usernameConvert a public WeChat Channels Channel ID (sph… short ID) into the finder username (v2_…@finder) required by the other WeChat Channels APIs.
[
{
"data": {
"channel_id": "sphi9BjV8GK0Zsl",
"debug_id": "42dfb22f",
"debug_info": "gAAAAABqxLkWlxsF9-g6bsOvFWyJB_XSH9irzWeyV9JX-YxhSKZPQX1zcETmPCDBpghgmprs8v7-WKdLrH96sjMHz7-f03uPgWUfWv2zjiDSYudngfF0Da4nqg3s03ENs5NimOHlVDEudfdNstnbEl34yeuH7lxAq4e79jnsWFmGASuvYFdUg7PvcM3nvsKWTiQxMFUuBDLknWwwTrMRiIEmfsT2M-h0Klreag6yUoRXUGFqAA4hwCsHBsWKOavYqbiQTOICeHDX4QU5b7Bx9D4YVF9ODgNOoQ==",
"desc": "参与、沟通、记录时代。",
"nickname": "人民日报",
"username": "v2_060000231003b20faec8c6e4811dc1d4c602ee30b0771bbcf220c67926bb76ab7702ac335a53@finder"
}
}
]เลือกตัวอย่างเพื่อโหลดอินพุตและผลลัพธ์ลงใน playground
This API takes a public WeChat Channels Channel ID (the short sph… ID) and returns the matching finder username (v2_…@finder). The response also includes the account nickname and bio.
username value you need before calling an account or video API for the same channel.nickname and desc.channel_id and username pair.curl -X POST "https://api.sandbase.ai/v1/api/wechat-channels/v2/channel-id-to-username" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"channel_id": "sphi9BjV8GK0Zsl", "raw": false}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | Channel ID (sph… short ID), e.g. sphi9BjV8GK0Zsl (People's Daily). Must start with sph. |
raw | boolean | No | Optional, default True. True=raw response; False=simplified parsed structure. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"channel_id": "sphi9BjV8GK0Zsl",
"debug_id": "8b961260",
"debug_info": "gAAAAABq6ZEeqTsKRQM1orP1An49kNtr_AbW7D7g90AVBCP1iJ6dpfwofN36FsORnSGOQ3Vo_qtnu_GC…",
"desc": "参与、沟通、记录时代。",
"nickname": "人民日报",
"username": "v2_060000231003b20faec8c6e4811dc1d4c602ee30b0771bbcf220c67926bb76ab7702ac335a53@…"
}
| Field | Meaning |
|---|---|
username | The finder username for the channel, in the form v2_…@finder. Pass this value to the other WeChat Channels APIs that ask for a username. |
channel_id | The Channel ID you sent, returned unchanged. |
nickname | The display name of the account, for example 人民日报. |
desc | The account bio text shown on the channel profile. |
debug_id / debug_info | Diagnostic values attached to the response. You do not need them to use the username. |
channel_id from a channel profile. It must start with sph and can be up to 64 characters.raw set to false, the response is the simplified structure shown here. raw defaults to true.username.username is a long string, so copy it in full.$0.01 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform API ที่มีการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์
curl -X POST "https://api.sandbase.ai/v1/api/wechat-channels/v2/channel-id-to-username" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"channel_id": "sphi9BjV8GK0Zsl",
"raw": false
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
channel_idstringจำเป็นChannel ID (`sph…` short ID), e.g. `sphi9BjV8GK0Zsl` (People's Daily). Must start with `sph`.
rawbooleanOptional, default True. True=raw response; False=simplified parsed structure.
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
[
{
"data": {
"channel_id": "sphi9BjV8GK0Zsl",
"debug_id": "42dfb22f",
"debug_info": "gAAAAABqxLkWlxsF9-g6bsOvFWyJB_XSH9irzWeyV9JX-YxhSKZPQX1zcETmPCDBpghgmprs8v7-WKdLrH96sjMHz7-f03uPgWUfWv2zjiDSYudngfF0Da4nqg3s03ENs5NimOHlVDEudfdNstnbEl34yeuH7lxAq4e79jnsWFmGASuvYFdUg7PvcM3nvsKWTiQxMFUuBDLknWwwTrMRiIEmfsT2M-h0Klreag6yUoRXUGFqAA4hwCsHBsWKOavYqbiQTOICeHDX4QU5b7Bx9D4YVF9ODgNOoQ==",
"desc": "参与、沟通、记录时代。",
"nickname": "人民日报",
"username": "v2_060000231003b20faec8c6e4811dc1d4c602ee30b0771bbcf220c67926bb76ab7702ac335a53@finder"
}
}
]สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
WeChat Channels | $0.01 ต่อการเรียก | JSON |
WeChat Channels | $0.01 ต่อการเรียก | JSON |
WeChat Channels | $0.01 ต่อการเรียก | JSON |
WeChat Channels | $0.01 ต่อการเรียก | JSON |
WeChat Channels | $0.01 ต่อการเรียก | JSON |
WeChat Channels | $0.01 ต่อการเรียก | JSON |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/wechat-channels/v2/channel-id-to-username โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.01 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: channel_id (string). ตัวเลือก: raw (boolean). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น WeChat Channels ID to Username ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง WeChat Channels API แยกต่างหาก