# 校验开放数据

# 1、接口地址

  • 生产环境:https://xxxxxxx/api/wxminigame/uniteverificationdata

域名请联系发行获取(安全模块域名)

# 2、使用场景

WARNING

  • 前提:微信小游戏服务器调用接口。
  • 场景:非必要不对接。
  • 调用:为防止客户端数据篡改,此接口用于验证小游戏客户端返回的数据。

# 3、接口说明

DANGER

  • 防篡改验证数据接口

# 4、请求方式

  • 方式:POST

  • 接入方式: 直接接入

    请求参数: headers头 Body raw(JSON)

参数类型 字段名 值类型 必填 说明
Body appId int 产品ID
Body accountId long 玩家账号ID
Body timestamp long 当前时间戳,秒,前后2小时有效
Body mainChannel int 二级渠道号
Body secondChannel int 三级渠道号
Body rawData string 客户端数据:待验证数据
Body signature string 客户端数据:签名
Body sign string 接口加密签名md5("accountId=" + accountId + "&appId=" + appId + "&mainChannel=" + mainChannel + "&rawData=" + rawData + "&secondChannel=" + secondChannel + "&signature=" + signature + "&timestamp=" + timestamp + appkey)

# 5、接口响应说明

  • 请求示例
{"appId":1756869291,"accountId":2109657271,"signature":"bd421b74ab50daa2b69fd495167ff33b123ec920","rawData":"{\"nickName\":\"旭辰\",\"gender\":0,\"language\":\"zh_CN\",\"city\":\"\",\"province\":\"\",\"country\":\"\",\"avatarUrl\":\"https://thirdwx.qlogo.cn/mmopen/vi_32/Spn6q2lRVWbtUwKiawfudP9vnia0NNzm9pYia5VHsWkIZ2dKMUP4e8zsbdAxgxgCLJ0Y2qyGrlgV7W5KPHvmAicWhzsIStU5oRu6THSyNVv3oY0/132\"}","mainChannel":100761,"secondChannel":100762,"timestamp":1739257366,"sign":"1c065909******d0cf9"}
  • 验证通过响应结果JSON格式

    {
    "resultCode": 10000,
    "datum": null,
    "resultInfo": "",
    "rid": "siwxmnde.71c416e19ecb457688b964fa46a75d3f"
    }
    
  • 返回说明:

参数类型 字段名 值类型 说明 备注
result resultCode int 响应值 10000验证通过,其它失败
result resultInfo string 提示信息
result rid string response identifies(响应唯一标识)
result datum T 数据泛型
Last Updated: 2025/2/13 11:39:55