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"
}
}
]예시를 선택하면 입력값과 결과가 플레이그라운드에 로드됩니다.
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.
빌드를 시작하세요
통합 인증 및 사용량 추적이 있는 플랫폼 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 키를 설정하세요. 요청에는 Bearer 인증이 사용됩니다.
export SANDBASE_API_KEY="YOUR_API_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 |
질문
Authorization 헤더(Bearer)에 SandBase API 키를 넣고, 매개변수를 JSON 본문으로 담아 https://api.sandbase.ai/v1/api/wechat-channels/v2/channel-id-to-username에 POST 요청을 보내세요. 이 페이지의 Playground에서도 코드를 작성하지 않고 직접 테스트할 수 있습니다.
호출당 $0.01, SandBase 잔액에서 청구됩니다. 사용한 호출에 대해서만 요금이 부과되며, 구독은 없습니다.
필수: channel_id (string). 선택: raw (boolean). 이 페이지의 Parameters 표와 Playground에 모든 필드가 나와 있습니다.
같은 HTTP 요청에서 반환되는 JSON 응답입니다(동기식). 이 페이지의 README에 샘플 응답이 포함되어 있습니다.
아니요. WeChat Channels ID to Username은 SandBase를 통해 실행되므로, SandBase API 키 하나로 이 엔드포인트와 카탈로그의 다른 모든 API 및 모델을 사용할 수 있습니다. WeChat Channels API 액세스를 별도로 신청할 필요는 없습니다.