在使用该文档前请联系兔展 生态合作中心负责人
方法一:通过URL传入客户身份识别的
使用方法:
- 作品链接上加previewer=mp和userInfo这两个参数;
- 在userInfo参数中传入平台标识和身份信息;
...
previewer字段说明
表明访问环境,支持的参数值有:mp、app。
- 当参数值为mp,表示小程序环境当参数值为mp,表示mini-program环境
- 当参数值为app,表示App环境
用户务必留意自己活动投放的环境。
注意:为防止作品本身发生默认的公众号授权,除字段 mp_userinfo & app_id 外任何时候
都必须要传递 stopAuth=1&previewer=mp 或者 stopAuth=1&previewer=app 来阻止默认的公众号授权以及标明此作品访问环境为mini-program环境或者APP环境
userInfo字段说明
字段 | 类型 | 描述 |
userInfo | object | 身份信息 |
identitys | object[] | 多组身份信息 ,最大支持5组身份信息 |
identityType | string | 身份类型:openid=微信环境下的openid、unionid=微信环境下的unionid,fans_id=有赞商城识别id,支持自定义类型标识 |
identityValue | string | 身份类型对应的id取值 |
mpid | string | 微信公众号appid或小程序appid或自建应用id等 |
platform | string | 平台标识,gzh(微信公众号)、contentminiapp(微信小程序)、EXTERNAL(自建应用) |
isWeChatEcosystem | boolean | 是否微信生态,true是 false否 |
...
如果有其它的用户信息,也可以附加在userInfo内进行上报,例如预设的头像(headimgurl)、昵称(nickname)、性别(sex)等。
customFields为用户信息扩展字段,以对象数组的形式支持传入多条数据,其中fieldValue为字符串数组类型,可传入多条数据,customFields为用户信息扩展字段,以对象数组的形式支持传入多条数据,其中fieldValue为字符串数组类型,可传入多条数据,fieldId为“
fieldId为“工作台”→“用户”→“字段管理”中的”字段id“的配置,
fieldKey为“工作台”->"用户“->“字段管理”中的“字段英文名”.工作台”->“用户”→“字段管理”中的”字段id“的配置
代码块 | ||||
---|---|---|---|---|
| ||||
{ "userInfo":{ "identitys":[ { "identityType":"openid", "identityValue":"openid-xxxx-xxxxx-xxxxx-xxxxx", "mpid":"wxappid", "platform":"gzh", "isWeChatEcosystem":true }, { "identityType":"unionid", "identityValue":"unionid-xxxx-xxxxx-xxxxx-xxxxx", "mpid":"wxappid", "platform":"gzh", "isWeChatEcosystem":true }, { "identityType":"user_id", // 身份类型标识,全局唯一用户ID标识建议用 user_id 。自定义身份字段名需要优先在 兔展 用户-身份字段管理中新增配置后才能正常使用 "identityValue":"user_id-xxxx-xxxxx-xxxxx-xxxxx", "mpid":"应用id", "isWeChatEcosystem":false }, { "identityType":"phone", "identityValue":"188xxxxxxxx" } ], "nickname": "xxxx", "headimgurl": "xxxx", "sex": "0", "customFields": [ { "fieldValue": ["",""], "fieldId "fieldId": xxx,(已弃用,20230203) "fieldKey": "" }, ] } } |
url地址带参示范
...