- 开发指南
- 开发前 必读
- 基本概念介绍
- 回调配置
- 企业微信账号ID安全性全面升级
- 代开发应用安全性升级
- ID转换接口
- unionid与external_userid的关联
- 获取服务商凭证POST
- 基础
- 连接微信
- 办公
- 智慧硬件
手机号转外部联系人ID
POST
/cgi-bin/externalcontact/batch_to_external_userid
服务端API第三方应用开发
学校需要使用“家校沟通”secret所获取的accesstoken来调用(accesstoken如何获取?);
第三方应用需拥有「家校沟通」使用权限。
原文档地址:
https://open.work.weixin.qq.com/api/doc/90001/90143/92506
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'https://qyapi.weixin.qq.com/cgi-bin/externalcontact/batch_to_external_userid?access_token=' \
--header 'Content-Type: application/json' \
--data-raw '{"mobiles":["10000000000","10000000001"]}'
响应示例响应示例
{
"errcode": 0,
"errmsg": "ok",
"success_list": [
{
"mobile": "18900000000",
"external_userid": "aaabbbcccc"
}
],
"fail_list": [
{
"errcode": 60136,
"errmsg": "record not found",
"mobile": "10000000001"
}
]
}
请求参数
Query 参数
access_token
调用接口凭证
示例值:
{{accesstoken}}
Body 参数application/json
mobiles
array[string]
必需
示例
返回响应
🟢200成功
application/json
Body
errcode
integer <int32>
返回码
fail_list
array [object {3}]
转换失败列表
errcode
integer <int32>
返回码
mobile
string
手机号
errmsg
string
可选
success_list
array [object {3}]
转换成功列表
external_userid
string
可选
foreign_key
string
可选
mobile
string
手机号
errmsg
string
可选

【企业微信】API开发者 微信交流群
用微信扫右侧二维码,加入【企业微信】API开发者 交流群,互助沟通


修改于 2022-12-07 02:34:27