获取用户来源
https://member.bilibili.com/arcopen/fn/market/customer/conversation/user_from
开放能力 / 经营号客服 / 接口文档
调用该接口可获取用户来源
body 参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| conversation_id | int | 是 | 会话id |
| user_open_id | string | 否 | 用户open_id(不传不返回标签信息) |
响应字段
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| user_basic_dto | struct | 是 | 用户来源基本信息 |
| source_up_info_dto | struct | 是 | 会话up来源信息 |
| tag_remark_dto | struct | 是 | 用户标签信息 |
| data_type | int | 是 | 数据类型:1 订单,2 商品,3店铺,13私信历史会话、11经营号个人空间品牌tab、12稿件评论区蓝链 |
| view_time | string | 是 | 来访时间 |
| source_up_open_id | string | 是 | up主open_id |
| source_up_name | string | 是 | up主名称 |
| source_bvid | string | 是 | 视频稿件bvid |
| source_btitle | string | 是 | 视频稿件名称 |
调用方式
javascript
// 让 AI 直接调(需要开放平台凭据)
bili_api_call { "ref": "60", "query": {…}, "body": {…} }
// 只看将要发出的请求(不需要凭据)
bili_api_call { "ref": "60", "dryRun": true }
// 生成完整调用代码
bili_codegen { "ref": "60", "lang": "python" }官方请求示例
bash
curl --location --request POST 'https://member.bilibili.com/arcopen/fn/market/customer/conversation/user_from' \
--header 'Accept: application/json' \
--header 'x-bili-timestamp: 1712473117' \
--header 'x-bili-signature-method: HMAC-SHA256' \
--header 'x-bili-signature-version: 2.0' \
--header 'Authorization: afdf0ddc6dd8f5af9c7f25cf3115a03142e67df99e15f909a17c11e4c82ad4f9' \
--header 'x-bili-signature-nonce: 1712473117993237000' \
--header 'x-bili-accesskeyid: 8ca079bc20ce433d' \
--header 'x-bili-content-md5: 795a2d7e13f989cee460801379fe543c' \
--header 'access_token: 454b8fb09ddf1e7ba405f158160f61a1' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/json' \
--header 'Host: member.bilibili.com' \
--data-raw '{
"conversation_id": 159719
"user_open_id": "aaaa1111"
}'原始文档:060_获取用户来源.md(3980 字节)。用 bili_docs_get { "ref": "60" } 读全文,或用 bili_api_spec { "ref": "60" } 取结构化规格。