# 云函数验证卡密V2

# 简要描述
  • 云函数验证卡密V2,非会员制,无需传递apiUserToken
# 方法名称
  • verifyCardV2
# 调用参数
参数名 必选 类型 说明
cardStr string 卡密
mac string 设备号
# 调用实例
const param={
    "openId":"9428FB7A7392BD73A13D8AFADF46BD51",
    "mac":"test"
}
// 调用方法
try{
	var res = potato.sendWeChatMessage(param)
	// 返回给调用接口
	res
}catch(e){
// 验证失败执行逻辑
}
1
2
3
4
5
6
7
8
9
10
11
12
# 调用方法返回示例
{
	"verify": true,
	"remark": null,
	"type": 0,
	"exTime": "2025-02-15 14:01:33"
}
1
2
3
4
5
6
# 返回参数
参数名 必选 类型 说明
verify boolean 验证结果
remark string 备注
type int 卡密类型
exTime string 过期时间
# API调用参数
参数名 必选 类型 说明
name string 函数名称
params json 调用参数
# API调用实例
{
	"name":"testFun"
}
1
2
3
# API调用请求头
参数名 必选 类型 说明
Content-Type string 此参数必传,当请求数据非json时此参数传对应格式如(multipartform-data,application/x-www-form-urlencoded,等)是json请传application/json
askKey string 此参数必传,验证app的令牌
sign string 此参数如果在app设置开启了验签是必传
time string 当开启验签时,此参数为必传
apiUserToken string 用户令牌
nonce string 随机字符串(当开启V3验签此参数必传,且2分钟内不允许重复)
# API调用返回参数说明
参数名 类型 说明
code string 状态码200成功,403权限异常或登陆超时,500请求异常,203请求无数据
status int 状态0删除1使用
data object 返回内容,云函数如果没有返回结果则该值为空
res object 执行返回数据
param object 返回执行参数,可以忽略
# API调用返回示例
{
	"code": "200",
	"message": "",
	"status": true,
	"data": {
		"res": {
			"verify": true,
			"remark": null,
			"type": 0,
			"exTime": "2025-02-15 14:01:33"
		},
		"param": {
			"cardStr": "9428FB7A7392BD73A13D8AFADF46BD51",
			"mac": "test"
		}
	},
	"pc": null,
	"time": null,
	"nonce": null,
	"sin": null,
	"sign": null
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 备注
  • 更多返回错误代码请看首页的错误代码描述
lastUpdate: 2/14/2025, 2:44:55 PM