- Overview of OpenAPI
- SlackOpenAPI
- ShopifyOpenAPI
- GithubAPI
- DiscordOpenAPI
- 历史文档(不推荐)
- 开发钉钉应用
- 服务端API
- 新版服务端API(DingTalk OpenAPI)
- 生态伙伴API
外部联系人unionid转换
POST
http://127.0.0.1/cgi-bin/externalcontact/unionid_to_external_userid
第三方应用开发/客户联系/客户管理
最后修改时间:2022-08-30 03:03:36
责任人:未设置
服务商代开发小程序指企业使用的小程序为企业主体的,非服务商主体的小程序。
场景:企业客户在微信端从企业主体的小程序(非服务商应用)登录,同时企业在企业微信安装了服务商的第三方应用,服务商可以调用该接口将登录用户的unionid转换为服务商全局唯一的外部联系人id
原文档地址:
https://open.work.weixin.qq.com/api/doc/90001/90143/93274
请求参数
Query 参数
access_token
string
调用接口凭证
示例值:
{{accesstoken}}
Body 参数application/json
unionid
string
必需
openid
string
必需
示例
{
"unionid": "string",
"openid": "string"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'http://127.0.0.1/cgi-bin/externalcontact/unionid_to_external_userid?access_token={{accesstoken}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"unionid": "string",
"openid": "string"
}'
返回响应
🟢200成功
application/json
Body
errcode
integer <int32>
返回码
external_userid
string
可选
errmsg
string
可选
示例
{
"errcode": 0,
"external_userid": "string",
"errmsg": "string"
}
