版本比较

标识

  • 该行被添加。
  • 该行被删除。
  • 格式已经改变。

...

  1. 本授权功能需接入方企业先在营销云开通 “数据集成” 模块,并获得 “自建应用” 的使用权限。

  2. 自建应用内申请开通 编辑器 → 自定义接口鉴权,后续联系管理员审核通过。应用配置界面如下:



    添加后,点击“编辑”进入对应设置页


    注意:此处如果需要自定义外部的校验参数,需勾选”外部接口回调“选项进行配置,具体配置如下




  3. 完成配置后,点击“保存”即可。

  4. 在编辑器中,可在作品预览页面开启作品访问限制鉴权,或在活动玩法配置中对应限制选项中进行配置,配置界面如下:



  5. 此配置案例下,在用户访问作品时,会调用主办方配置的鉴权接口,发送在数据集成自定义接口鉴权中配置好的字段,通过接口返回结果来判断用户是否具有作品访问资格。

外部接口鉴权api参数说明

外部接口请求方法请求参数返回结构请求示例
获取鉴权条件GET-


代码块
languagejs
linenumbers
theme
true
Midnight
collapse
linenumberstrue
{
	"code": "200",
	"msg": "ok",
	"data": [
		{
			"label": "范围",
			"type": "area",
			"value": "",
			"children": [
				{
					"value": "80"
				},
				{
					"value": "100"
				}
			]
		},
{
			"label": "
性别
时间范围",
			"type": "
checkbox
dateTimeRange",
			"value": "",
			"children": [
				{
					"
label
value": "
男", "value": "1
YYYY-MM-DD HH:mm"
				},
				{
					"
label
value": "
女", "value": "2
YYYY-MM-DD HH:mm"
				}
			]
		},
		{
			"label": "
部门
性别",
			"
value
type": "checkbox",
			"
type
value": "
select
",
			"children": [
				{
					"label": "
A部门
",
					"value": "
a
1"
				},
				{
					"label": "
B部门
",
					"value": "
b
2"
				}
,

			]
		
{
},
		{
			"label": "
C部门
部门",
			"value": "
c
",
			
}
"type": "select",
			
]
"children": [
		
},
		{
					"label": "
年龄
A部门",
					"
type
value": "
number
a"
,

				
"value": "18"
},
			
"children": [] },
	{
		
{
			"label": "
分类
B部门",
		
"type": "cascader",
			"value": "b"
,

				
"children": [
},
				{
					"label": "
项目分组
C部门",
					"value": "
project_group
c"
,

				
"children": [
}
			]
		
{
},
		
{
			"label": "
新客户
年龄",
			
"type": "number",
			"value": "
1
18",
			
"children": []
		},
		{
			"label": "
未成交老客户
分类",
			
"type": "cascader",
			"value": "
2
",
			"children": [
				
}
{
					
] }, {
"label": "
经纪人分组
项目分组",
					"value": "
broker
project_group",
					"children": [
						{
							"label": "
自由合伙人
新客户",
							"value": "
9004
1"
						},
						{
							"label": "
代理公司
未成交老客户",
							"value": "
9003
2"
						}
					]
				},
				
]
{
					
} ] }

参数说明

label:标签名称

value:标签值

type:文本 text,数值 number,多选 select,单选 checkbox,区间 area ,级联 cascader

children:子集(只有在级联、多选、单选、区间类型时才不为空)

https://editor.test.rabbitpre.com/api/editor/proxy/thirddata/api/xxx/cms/getAuthConditions

保存通知接口POST字段名称字段类型是否必传字段说明userIdstringtrue当前用户id。透传到客户侧的参数componentIdstringfalse
当前作品下玩法组件ID。透传到客户侧的参数appIdstringfalse兔展作品ID。透传到客户侧的参数,该值是否一定有值和作品(玩法)的保存顺序有关authScopenumbertrue

默认值 0。

0:玩法资格配置,

1:作品访问限制资格配置,

2:流程策略资格配置

externalConfigIdstringfalse外部配置id(传空代表新增配置,不为空代表修改配置)。也即该接口响应返回的configId字段值treeNodesObjecttrue└─ labelstringtrue名称└─ valuestringtrue└─ childrenObjectfalse子集└─ typestringfalse文本 text,数值 number,多选 select,单选 checkbox,区间 area ,级联 cascadersceneTypestringfalse玩法类型externalConfigOperatorstringfalse外部参数运算符,选项有“ALL”和“IN”,分别对应满足全部与其中之一externalConfigValueslist<string>false外部条件值
代码块
languagejs
{
	"code:" 200,
	"data": {
		// 外部接口返回的配置id
		"configId": "aaa-bbb-ccc"
	}
}
https://editor.test.rabbitpre.com/api/editor/proxy/thirddata/api/xxx/cms/saveNotice

入参:

{
"treeNodes": [
{
"label": "经纪人分组",
"value": "broker_group",
"type": "select",
"children": [
{
"label": "公务员或企事业单位人员",
"value": "7000661",
"type": "select",
"children": []
}
]
}
],
"externalConfigId": "aaa-bbb-ccc",
"userId": "63fe7339-f4a5-412a-9676-1c15a2ffdecf",
"componentId": "93e0d4e1-e8e6-4451-88a4-355585d4d28f",

"appId": "63fe7339-2wed-trfg-9676-1c15a2ffdecf",

"authScope": 0 ,
"sceneType": "Award"
}

鉴权接口协议:

鉴权接口完整URL:自建应用方自己的 domain+URI

例如: https://aa.bb.com/api/xx/checkDataAuth

接口协议:HTTPS

HTTP请求方式:POST

consumes :application/json

produces :application/json

接口响应时间:3秒以内,最好能达到百毫秒级,满足高并发场景。活动H5方调用鉴权接口最多等待3秒,超过3秒没有响应,自动放弃请求,判定为鉴权失败。

...

字段名称

...

字段类型

...

字段说明

...

interfaceName

...

checkType

...

校验类型: 

false:自定义设置 

true:外部接口回调

...

externalConditionUrl

...

externalInformUrl

...

externalConfigId

...

externalConfigOperator

...

externalConfigValues

...

是否星标 1 0

...

└─ customFields

...

└─ fieldId

...

自定义字段ID

...

└─ fieldType

...

自定义字段类型 1 文本输入(默认) 2 单选 3 复选 4 数值

...

└─ fieldValue

...

自定义字段值

...

authParams

...

└─ paramType

...

参数类型:

文本-text,数值-number,多选-select,单选-checkbox,区间-area

(文本:可输入string类型,支持字母+数字+下划线+中文

数值:支持双精度小数,整数;支持大于、大于等于、小于等于、小于、区间(闭区间) 

单选、复选: 取值 选项标识参数值去string类型,单选仅满足其中之一;复选可以满足所有选项,也可满足其中之一 )

...

参数值

...

└─ option

...

"label": "经纪人分组",
					"value": "broker_group",
					"children": [
						{
							"label": "自由合伙人",
							"value": "9004"
						},
						{
							"label": "代理公司",
							"value": "9003"
						}
					]
				}
			]
		}
	]
}

参数说明

label:标签名称

value:标签值

type:文本 text,数值 number,多选 select,单选 checkbox,区间 area ,级联 cascader

children:子集(只有在级联、多选、单选、区间类型时才不为空)

https://editor.test.rabbitpre.com/api/editor/proxy/thirddata/api/xxx/cms/getAuthConditions


保存通知接口POST


字段名称字段类型是否必传字段说明
userIdstringtrue当前用户id。透传到客户侧的参数
componentIdstringfalse
当前作品下玩法组件ID。透传到客户侧的参数
appIdstringfalse兔展作品ID。透传到客户侧的参数,该值是否一定有值和作品(玩法)的保存顺序有关
authScopenumbertrue

默认值 0。

0:玩法资格配置,

1:作品访问限制资格配置,

2:流程策略资格配置

externalConfigIdstringfalse外部配置id(传空代表新增配置,不为空代表修改配置)。也即该接口响应返回的configId字段值
settingData
Array<Object>false
└─ labelstringtrue名称
└─ namestringtrue标识
└─ valueObjecttrue值。不同的type值对应不同数据格式的value,参考示例。type为text、number的value值是string
└─ typestringfalse文本 text,数值 number,多选 select,单选 checkbox,区间 area ,级联 cascader dateTimeRange
└─ operatorstringfalse

ALL : 全部,IN : 其中之一,
EQ : 等于,GT : 大于,GTEQ : 大于等于,LT : 小于,LTEQ : 小于等于,NEQ :不等于

type为cascader、select、number时为空
sceneTypestringfalse玩法类型:

Award-领奖,Lottery-抽奖,Help-助力,Team-组队,Reserve-预约,Signin-签到,Question-问卷,Answer-答题,Vote-投票,Game-游戏,Task-任务,Points-积分,Seckill-秒杀,GroupBuying-拼团,Tzappid-作品级



代码块
languagejs
themeMidnight
linenumberstrue
{
	"code:" 200,
	"data": {
		// 外部接口返回的配置id
		"configId": "aaa-bbb-ccc"
	}
}



https://editor.test.rabbitpre.com/api/editor/proxy/thirddata/api/xxx/cms/saveNotice

 

入参:

代码块
languagejs
themeMidnight
{
	"settingData": [{
			"label": "职业文本",
			"type": "text",
			"name": "professiontext",
			"value": "文本的值"
		},
		{
			"label": "用户身份数值",
			"type": "number",
			"name": "userFlagNumber",
			"operator": "EQ",
			"value": "9527"
		},
		{
			"label": "性别",
			"type": "select",
			"name": "gender",
			"operator": "IN",
			"value": [
				"1"
			]
		},
		{
			"label": "是否新客户",
			"type": "checkbox",
			"name": "isCustomer",
			"value": "1"
		},
		{
			"label": "人生阶段",
			"type": "select",
			"name": "lifeStage",
			"operator": "IN",
			"value": [
				"1",
				"2",
				"3",
				"4"
			]
		},
		{},
		{
			"label": "城市",
			"type": "cascader",
			"name": "city",
			"operator": "IN",
			"value": [{
					"label": "北京市",
					"value": "北京市",
					"type": null,
					"children": [{
						"label": "北京市",
						"value": "北京市",
						"type": null,
						"children": null
					}]
				},
				{
					"label": "天津市",
					"value": "天津市",
					"type": null,
					"children": [{
						"label": "天津市",
						"value": "天津市",
						"type": null,
						"children": null
					}]
				}
			]
		}, {
			"label": "城市",
			"type": "cascader",
			"name": "city",
			"operator": "IN",
			"value": ["北京市", "天津"]
		}
	]
}],
"externalConfigId": "",
"userId": "2a40a6c6-7379-4961-9088-cb9a071f3a55",
"componentId": "31bc2f36-c5de-4c34-adf6-c967a92561b8",
"sceneType": "Tzappid",
"appId": "31bc2f36-c5de-4c34-adf6-c967a92561b8",
"authScope": 1
}


 

 

 






鉴权接口协议:

鉴权接口完整URL:自建应用方自己的 domain+URI

例如: https://aa.bb.com/api/xx/checkUserAuth

接口协议:HTTPS

HTTP请求方式:POST

consumes :application/json

produces :application/json

接口响应时间:3秒以内,最好能达到百毫秒级,满足高并发场景。活动H5方调用鉴权接口最多等待3秒,超过3秒没有响应,自动放弃请求,判定为鉴权失败。


接口参数说明表:

字段名称

字段类型

是否必传

字段说明

interfaceName

stringtrue接口鉴权名称

checkType

stringfalse

校验类型: 

false:自定义设置 

true:外部接口回调

externalConditionUrl

stringfalse外部接口回调-获取鉴权条件URL

externalInformUrl

stringfalse外部接口回调-保存通知接口

externalConfigId

stringfalse外部接口配置的ID
userParamObjecttrue用户参数。对应自建应用中的系统参数中的固定参数
└─ audidstringtrue客户档案id
└─ openidstringfalseopenid
└─ appIdstringtrue作品id
└─ componentIdstringfalse组件id
└─ flowIdstringfalse流程策略id
└─ appInstanceIdstringfalse自建应用的id
└─ identityIdstringfalse自建应用的识别的身份id
└─ identityTypestringfalse自建应用的身份类型
└─ realName stringfalse真实姓名
└─ phone   stringfalse手机号码
└─ addressstringfalse地址信息
└─ devicestringfalse手机型号 ios/Android
└─ markFlagintegerfalse

是否星标 1 0

└─ payFeaturestringfalse消费特点
└─ sexintegerfalse性别 1男 2女
└─ identitysArrayfalse用户多身份信息
     └─ identityId stringfalse自建应用的识别的身份id。platform=EXTERNAL(自建应用)
     └─ identityType stringfalse自建应用的身份类型。platform=EXTERNAL(自建应用)
     └─ fromTostringfalse标识来源
     └─ platformstringfalse标识来源平台。平台标识,gzh(微信公众号)、contentminiapp(微信小程序)、EXTERNAL(自建应用)
     └─ openidstringfalseopenid (当 fromTo 为 gzh(微信公众号) 时,openid有值)
     └─ unionidstringfalseunionid (当 fromTo 为 gzh(微信公众号) 时,unionid有值)

     └─ jcappid

Long

true系统集成Id
     └─ appid stringfalse公众号appid

└─ customFields

Arrayfalse

自定义字段可能会存在多个。对应工作台中的用户-字段管理中的字段

此参数已删除

     └─ fieldId

stringfalse

自定义字段ID

     └─ fieldType

stringfalse

自定义字段类型 1 文本输入(默认) 2 单选 3 复选 4 数值

     └─ fieldValue

Arrayfalse

自定义字段值

authParams

Arraytrue鉴权参数集合。对应工作台中的校验参数列表,用于客户侧校验的字段
└─ chineseNamestringtrue参数中文名
└─ englishNamestringtrue参数英文名

└─ paramType

stringtrue

参数类型:

文本-text,数值-number,多选-select,单选-checkbox,区间-area

(文本:可输入string类型,支持字母+数字+下划线+中文

数值:支持双精度小数,整数;支持大于、大于等于、小于等于、小于、区间(闭区间) 

单选、复选: 取值 选项标识参数值去string类型,单选仅满足其中之一;复选可以满足所有选项,也可满足其中之一 )

└─ valuesObjectfalse

参数值

└─ option

Arrayfalse多选值
     └─ keystringfalse复选框key
     └─ valuestringfalse复选框value
└─ operatorstringfalse操作符(EQ(相等)、GT(大于)、GTEQ(大于等于)、LT(小于)、LTEQ(小于等于)、NEQ(不等)、IN(在枚举范围内)、ALL(全部)、BETWEEN(范围比较) )
externalExtras
Objectfalse外部扩展参数
└─ key1Stringfalse外部参数key1,根据实际传递的参数
└─ key2Stringfalse外部参数key2,根据实际传递的参数

接口响应参数说明:

Field

Type

Description

Required

code

string

响应状态码。

200 : 成功。非200都是失败

true

msg

string

响应状态描述

true

data

object

数据。"true"

true

errorCodestring

错误状态码。

如果code返回非200,建议接口提供方必填

false


请求参数示例:

代码块
languagejs
linenumberstrue
{
    "interfaceName": "接口通过",
    "checkType":true,
    "externalConditionUrl":"",
    "externalInformUrl":"",
    "externalConfigId": "7697ac58-0e30-4111-a169-9c96023aacf8",
    "externalConfigOperator": "ALL",
    "externalConfigValues": [
        [
            "shenfen"
        ]
    ],
    "userParam": {
        "audid": "720332229959618560",
        "openid": "wx35c610c7c049ce8287-8",
        "appId":"xxxxxxx",
        "componentId":"xxxxxxx",
        "flowId":"xxxxxxx",
        "appInstanceId": "自建应用的id",
        "identityId": "12345678",
        "identityType": "customerNo;",
        "phone": "18777777777",
        "realName": "张三",
        "address": "广东省深圳市南山区",
        "device": "ios/Android",
        "markFlag": "1",
        "payFeature": "厉害",

接口响应参数说明:

...

字段名

...

类型

...

说明

...

结果返回码,200为正常,其余都为错误

...

msg

...

请求参数示例:

代码块
languagejs
linenumberstrue
{
    "interfaceName": "接口通过",
    "checkType":true,
    "externalConditionUrl":"",
    "externalInformUrl":"",
    "externalConfigId": "7697ac58-0e30-4111-a169-9c96023aacf8",
    "externalConfigOperator": "ALL",
    "externalConfigValues": [
        [
            "shenfen"
        ]
    ],
    "userParam": {
        "audidsex": "7203322299596185601",
    },
    "openidauthParams": "wx35c610c7c049ce8287-8",
 [
        {
            "appIdchineseName": "xxxxxxx开始日期",
            "componentIdenglishName": "xxxxxxxstart_date",
            "flowIdparamType": "xxxxxxxtext",
            "appInstanceIdvalues": "自建应用的id2021-07-01",
            "identityIdoperator": "12345678"null,
            "identityTypeoption": "customerNo;"[],
        "phone": "18777777777"},
        {
   "realName": "张三",
        "addresschineseName": "广东省深圳市南山区结束日期",
            "deviceenglishName": "ios/Androidend_date",
            "markFlagparamType": "1text",
            "payFeaturevalues": "厉害2021-07-31",
            "sexoperator": "1"null,
            "customFieldsoption": [],
        },
    {
    {
            "fieldIdchineseName": "132首次办理",
    
            "fieldTypeenglishName": "textfirst_deal",
                "fieldValueparamType": "434334199111113445select",
                "fieldNumValuevalues": "自定义数值1",
            "operator": }null,
             {"option": [],
                "fieldId},
		{
			"chineseName": "111",
			"englishName": "133aa",
                "fieldType			"option": [],
			"paramType": "textnumber",
                "fieldValue			"values": "231231321222221113222",
                "fieldNumValue			"operator": "自定义数值"
            }
        ]
    },
    "authParams": [
        {
            EQ"
		},
		{
			"chineseName": "开始日期版本",
			"englishName":            "englishName"bb",
			"option": [
				{
					"key": "start_date",
            "paramType					"value": "text",
            "values哈哈"
				},
				{
					"key": "2021-07-01",
            "operator": null,
            "option": [],
        },
        {
            "chineseName": "结束日期",
            "englishName": "end_date",
            "paramType": "text",
            "values": "2021-07-31",
            "operator": null,
            "option": [],
        },
        {
            "chineseName": "首次办理",
            "englishName": "first_deal",
            "paramType": "select",
            "values": "1",
            "operator": null,
            "option": [],
        					"value": "哦哦发"
				}
			],
			"paramType": "checkbox",
			"values": "我"
		},
		{
			"chineseName": "此次",
			"englishName": "cc",
			"option": [],
			"paramType": "area",
			"values": [
				20,
				202
			]
		},
{
			"chineseName": "此次",
			"englishName": "cc",
			"option": [],
			"paramType": "dateTimeRange",
			"values": [
				20,
				202
			]
		},
		{
			"chineseName": "111外部接口参数",
			"englishName": "externalInterface",
			"paramType": "aacascader",
			"option": []
				{
					"label": "小程序分组",
					"paramTypevalue": "number"mini_app_group",
					"valuestype": "222"null,
					"operatorchildren": "EQ"[
				},
		{
							"chineseNamelabel": "版本小程序新客",
							"englishNamevalue": "bb500500",
			"option": [
				{
					"keytype": "我",
null,
							"valuechildren": "哈哈"
[]
						},
						{
							"keylabel": "单位人员",
							"value": "哦哦发7000661",
				}
			],
			"paramTypetype": "checkbox"null,
							"valueschildren": "我"
[]
						},
		{
			"chineseName": "此次",
]
				"englishName": "cc",}
			"option": [],
			"paramTypevalues": "area",[
				"values": [
					20,"mini_app_group"
				202]
			],
			"operator": "IN"
		}
  }
    ],
    "externalExtras":{
      "key1":"value1",
    "key2":"value2"
   ]}
}

...



返回结果示例:

代码块
languagejs
themeMidnight
linenumberstrue
{
    "code":"200",
    "msg":"鉴权成功",
    "data": "true",
    "errorCode" : ""
}