3.1.37 获取用户基本信息(OAuth2)


用户授权第三方获取用户基本信息。

用户授权入口:https://dms.shopoint.cn/wxmall/index.html#openapi/oauth2/authorize?appId={appid}&redirectUri={redirectUri}&responseType=code&scope=snsapi_mobile&state=STATE

注意:替换appid和redirectUri。通惠将会把请求重定向到指定的redirectUri,并在URL中携带code参数,如http://mydomain.com?myparam=myvalue&code=xxx。接下来,对接方使用标准接口(allinpay.shopoint.oauth2.userInfo)通过code获取用户的手机号等已授权信息。

接口方法:

method: allinpay.shopoint.oauth2.userInfo

version: 1.0

业务请求参数

字段名

参数类型

必填

最大长度

说明

取值

code

String

50

获取用户基本信息所使用的code

注意:

1.该code的有效期为5分钟,过期自动作废。

2.该code具有一次性特点,使用后自动作废。

3.该code仅能由对应的appId使用。

业务响应参数

字段名

参数类型

必填

最大长度

说明

取值

code

Integer

 

返回码

0:表示成功;

3:表示失败,具体失败原因参见msg字段;

其他:参见4.1 公共返回码

msg

String

 

错误信息

 

data

String

 

用户授权的基本信息

JSON格式的字符串


卜子超buzc 2025年5月14日 16:32 收藏文档