跳到主要内容

腾讯刷掌移动端(H5)SDK接口文档

本文档 Max 与 Standard 两个版本通用,接口内容一致。

版本更新记录

版本号发布日期更新内容
v2.4.02026-07-28新增微信小程序原生采集 SDK(见《腾讯刷掌移动端(小程序)SDK接口文档》);本文档按统一接口文档模板重排
v2.3.02026-07-13测试示例升级为完整可运行 HTML 页面并集中前置常量配置;appId 调整为必填

简介

Tencent Palm Mobile Manager Web SDK 是 iOS/Android/Flutter PalmMobileManager 原生 SDK 的 Web 端移植 —— Params / Result / Mode / PalmDirection / ResultCode 一一对齐,同一套后端与业务日志体系可直接复用。通过 iframe + postMessage 把摄像头与 wasm 采集隔离在受信任的独立源中。SDK 部署在独立的 SDK Host 域名下,宿主页通过一行 <script src> 即可接入,支持注册核验 (1:1)识别 (1:N) 三种模式。

核心模块

SDK 由两大核心模块构成:管理模块采集模块,行为与 native 版本一一对齐。

管理模块

用户管理中心,主要负责管理掌纹信息,如:注册用户流程,管理用户掌纹信息

  • 用户管理 - 自动查询/创建用户,展示手掌注册状态(已注册/未注册/预录入)
  • 业务流程 - 支持注册、识别 (1:N)、核验 (1:1) 三种模式
  • 界面交互 - 展示操作引导、处理结果、错误提示与重试
  • 结果处理 - 接收采集结果,自动上报识别/核验记录(提示:需要在刷掌管理平台配置场景对应 SN 为 PalmMobileManager,才支持记录上报
  • 结果回调 - 仅在关键错误(Token 失效、网关认证失败)或用户主动退出时回调您的宿主页

采集模块

手掌信息采集,主要负责采集算法部分,如:采集掌纹、注册/核验/识别

  • 相机采集 - 通过 navigator.mediaDevices.getUserMedia 唤起摄像头,提供实时预览画面
  • AI 处理 - 内置掌纹检测、质量评估、活体动作判断等算法能力(wasm 推理)
  • 交互引导 - 引导用户完成"张开手掌"、"握拳"等动作
  • 数据上报 - 采集图像加密后上传至服务器。活体录像上传为强制行为(作为合规/审计证据):客户端本地未成功录到 → ErrLivenessVideoCaptureFailed;服务端判定视频不合格 → ErrLivenessVideoFailed;上传失败 → ErrNetwork。三种情况都不会被吞掉。

功能特性

  • 多种模式:支持注册核验 (1:1)识别 (1:N) 三种模式。
  • 优化的AI算法:在 SDK 内部通过 WebAssembly 直接集成了高性能的检测配准、活体判断、质量控制、动作判断等算法。
  • 模块化UI组件:为管理和采集模块提供了完整、预构建的 Vue UI,极大缩短了开发周期。
  • Origin 隔离:采集 UI 与 wasm 运行在独立源的 iframe 内,通过 postMessage + 严格 origin 校验与宿主页解耦。
  • 安全设计:所有掌纹数据在传输至服务器前均经过自动加密。

术语表 / 核心概念

为了更好地理解本 SDK 采集结果与设备端使用差异,请了解以下特征库的区别:

  • 【掌纹】单因子特征库
    • 说明: 仅记录【掌纹】单因子信息。因浏览器摄像头无法采集【掌静脉】,本 SDK 仅采集【掌纹】单因子信息。
  • 【掌纹+掌静脉】双因子特征库
    • 说明: 同时记录【掌纹】和【掌静脉】双因子信息。这是用于专业设备录入的高安全标准。

SDK Host

SDK 由服务方部署在一个独立域名(SDK Host)下,宿主页只需通过一行 <script src> 引入该域名下的 loader 即可完成接入。采集所需的 iframe、wasm、摄像头 UI 全部由 SDK Host 自动加载与托管,宿主页无需关心其内部构成

  • <SDK Host>/palm_h5/loader/palm-mobile-manager.js —— 宿主页 <script src> 引入的入口
  • <SDK Host>/palm_h5/embed/ —— 采集 iframe 自动加载的页面(loader 会自动推断地址,无需手动配置)

重要:SDK Host 必须与您的宿主页处于不同的 originpostMessageMessageEvent.origin 校验才有意义。loader 与 embed 同处一个 SDK Host,loader 会从自身 <script src> 自动推断 embed 地址,宿主页零配置。

工作流程

注意:若仅使用采集模块enableManager = false,则不会自动通过管理模块创建用户),请先由您的服务端调用 Tencent PalmAI Platform OpenAPICreateUser 接口完成用户创建,再执行以下步骤。

1. 获取用户令牌

您的服务端必须首先从 Tencent PalmAI Platform OpenAPI 请求一个与用户 UserId 绑定的 AccessToken

提示:调用【获取访问凭证】接口时,需要指定 GrantType 类型为 client_credential_user,同时指定 UserId 参数。

管理模块

采集模块

2. 启动 SDK

我们的后端服务分为刷掌业务平台刷掌算法平台两部分,SDK 提供对应的两个模块进行连接:

SDK 模块对接后端说明
管理模块刷掌业务平台提供完整的掌纹管理界面,从管理页面进入,进行页面交互后跳转至采集画面,由 SDK 内部处理 result
采集模块刷掌算法平台直接跳转摄像头采集画面,进行掌纹采集及算法处理,由您自行设计管理页面并处理 result

根据您的业务需求选择对应模块:

  • 管理模块:使用 AccessToken必填用户信息启动(enableManager = true
  • 采集模块:使用 AccessToken必填用户信息启动(enableManager = false

3. 自动化流程

管理模块会自动完成以下流程,无需您的宿主页干预

  1. 查询用户注册状态
  2. 展示友好的界面和操作提示
  3. 根据模式(注册/识别/核验)调用采集模块
  4. 接收并处理采集模块的各种情况(成功、权限问题、网络问题、算法结果等)
  5. 提示用户重试或展示最终结果

采集模块则需要自己处理 result 结果,其中 code 字段对应本文档中结果码。

4. 获取回调

用户点击返回或遇到关键错误时,管理模块会关闭 iframe 并通过 Promise / callback 回调至您的宿主页;采集模块需要您自己处理。同一时刻只允许一个会话,并发调用会立即以 ErrSdkRuntime (10007) 拒绝。

运行环境要求

为确保 SDK 的稳定运行与兼容性,请确保您的运行环境满足以下最低要求:

要求
协议HTTPS(localhost 例外)。浏览器 getUserMedia 强制要求安全上下文。
浏览器● 桌面:Chrome / Edge ≥ 88,Firefox ≥ 90,Safari ≥ 14
● 移动:iOS Safari ≥ 14,Android Chrome ≥ 88
● 必需能力:MediaDevices.getUserMediapostMessage、ES2020、WebAssembly
iframe 权限SDK 会自动在 iframe 上设置 allow="camera; microphone"。若宿主页自身位于第三方 iframe 内,需在外层逐级放行相机权限。
Node/构建(仅本地开发)Node.js ≥ 18;pnpm ≥ 9

集成步骤

前置条件

  1. SDK Host 地址:服务方已将 SDK 部署在独立域名(如 https://sdk.example.com)并向您提供该地址。
  2. HTTPS:浏览器 getUserMedia 强制要求 HTTPS(localhost 例外),SDK Host 与宿主页均需 HTTPS。
  3. 场景 SN:如需上报识别/核验记录,需在刷掌管理平台把场景 SN 配置为 PalmMobileManager

<script> 接入

  1. 引入 Loader

    <!-- 生产:从您的 SDK Host 引入 -->
    <script src="https://sdk.example.com/palm_h5/loader/palm-mobile-manager.js"></script>

    UMD 产物window.PalmMobileManager 命名空间下暴露 PalmMobileManager 类,导出 Mode / PalmDirection / ResultCode 枚举 —— 接入时请直接使用序列化后的字符串/数字字面量('registration''palm_direction_unspecified'0 …)。

  2. 简要调用示例

    <script>
    const { PalmMobileManager } = window.PalmMobileManager;

    const params = {
    token: USER_TOKEN,
    userId: USER_ID,
    userName: USER_NAME,
    phoneNo: USER_PHONE_NO,
    appId: APP_ID,

    // UMD 下枚举值以字符串字面量传入:
    // "registration" | "verification" | "recognition"
    mode: 'registration',

    // 核验模式必填
    // targetUserId: TARGET_USER_ID,

    // customHeaders: { Authorization: 'YOUR_JWT_TOKEN' },
    // enableManager: true,
    // palmDirection: 'palm_direction_unspecified',
    };

    PalmMobileManager.start(params, (r) => {
    // TODO: 根据 r.code 处理业务逻辑
    console.log('[PalmMobileManager]', r);
    }).then((result) => {
    console.log('final:', result);
    });
    </script>

    零配置:loader 以自身 <script src> 的 origin 作为 embed 站点地址。只要 loader 与 embed 部署在同一 SDK Host(本地联调的 vite dev server 也属此情况),宿主页无需任何额外配置。

本地联调

本地调试接入时,无需获取 SDK 源码:在自己的宿主页工程里把 <script src> 指向服务方提供的 SDK Host 地址即可。

<!-- 指向服务方提供的 SDK Host(HTTPS) -->
<script src="https://sdk.example.com/palm_h5/loader/palm-mobile-manager.js"></script>
  • 宿主页跑在 http://localhost 即可。localhost 是安全上下文;摄像头由 SDK Host 的 HTTPS iframe 调起,与宿主页协议无关。
  • 若 SDK Host 为测试环境且使用自签证书,需先在浏览器访问一次 <SDK Host>/palm_h5/embed/ 并接受证书,否则 iframe 加载会以 ERR_CERT_AUTHORITY_INVALID 失败。

API 参考

PalmMobileManager.start(params, callback?)

启动一次采集流程,返回 Promise<Result>callbackPromise 会拿到同一份 Result。同一时刻只允许一个会话;并发调用会立即返回 ErrSdkRuntime (10007)

位置参数类型必填说明
paramsParams业务参数,见下
callback(result: Result) => void可选回调;未传时 Promise 同样会 resolve 出同一份结果

Params

启动 SDK 时的配置参数对象。

提示:必填参数+可选参数在启动 SDK 传入时,仅进行非空、非法校验,否则返回 code=10001。接入方应遵循下述格式要求,否则会在管理模块提示用户网络相关错误。

必填参数

参数类型描述
tokenstring用户身份令牌,用于授权本次 SDK 操作。
userIdstring用户唯一标识符。
格式要求:1-64 字符,仅支持 ASCII 字母(A-Z, a-z)、数字(0-9)、短横线(-)和下划线(_),不允许空格及其他空白字符。
userNamestring用户名称。
格式要求:1-64 字符(Unicode 字符),不允许仅由空白字符组成,前后不允许包含空格(允许字符中间有空格)。支持脱敏处理。
phoneNostring用户手机号。
格式要求:纯数字(手机号 4-20 位)、包含区号(1-3 位),如 (+86)13800138000。支持脱敏处理。
modeMode业务模式(Web 版为必填,与 native 默认 REGISTRATION 略有不同)。可选值:
Mode.Registration ('registration') - 注册模式
Mode.Verification ('verification') - 核验模式 (1:1)
Mode.Recognition ('recognition') - 识别模式 (1:N)
appIdnumber应用 ID,由服务方提供。

可选参数

参数类型默认值描述
targetUserIdstring-待核验的目标用户 ID。
注意Mode.Verification 模式下必需。
enableManagerbooleantrue是否启动管理模块。为 true 时启动管理模块,为 false 时启动采集模块。
customHeadersRecord<string, string>{}自定义 HTTP 请求头。用于访问您配置的网关(如传递 JWT Token)。
palmDirectionPalmDirectionUnspecified采集时使用哪只手掌。可选值:
PalmDirection.Unspecified ('palm_direction_unspecified') - 任意手掌均可(默认)
PalmDirection.Left ('left') - 强制使用左手
PalmDirection.Right ('right') - 强制使用右手

与 native 的差异:Web 版不暴露 baseUrl。API 服务地址由 embed 站点在部署时决定(通过反向代理指向对应环境),宿主页无法覆盖。若需连接不同环境的后端,请部署对应环境的 embed 站点。

Result

SDK 退出时通过回调返回的结果对象。

interface Result {
code: ResultCode;
message: string;
data?: RegistrationData | RecognitionData | VerificationData;
}
属性类型描述
codenumber结果码,详见下方回调结果码列表。
messagestring描述信息,仅用于调试。
dataResultData | undefined成功时的详细结果数据,形态由 mode 决定。

ResultData

interface RegistrationData {
userId: string;
palmDirection?: PalmDirection;
}

interface RecognitionData {
userId: string;
score: number;
userName?: string;
palmDirection?: PalmDirection;
}

interface VerificationData {
isMatch: boolean;
score: number;
palmDirection?: PalmDirection;
}

回调结果码

管理模块会自动处理采集模块中的大部分结果。您的宿主页仅会收到以下结果码的回调

结果码场景处理建议
0操作成功或用户主动返回无需处理
10001参数非法校验参数是否合法,如必填项是否为空、mode/targetUserId 组合是否合规等
10012Token 无效或过期重新获取 Token
10021管理页查询用户不存在清除本地登录态并提示用户重新登录
10401网关认证失败请联系 SDK Host / 网关提供者进行技术支持,或添加您网关对应的 JWT 认证信息

完整结果码参考

说明采集模块enableManager = false)不会捕获结果码进行内部处理,宿主页需自行分发。完整结果码参考如下:

点击展开查看所有结果码
通用结果码
结果码枚举开发说明
0Success操作成功(会回调
10000ErrUnknown未知错误
10001ErrInvalidParams参数无效(会回调
10002ErrUserCancelled用户取消采集操作
10003ErrCameraPermissionDenied相机权限被拒绝
10004ErrCameraInitFailed相机初始化失败
10005ErrCameraPreviewUnsupported不支持的相机预览尺寸
10006ErrSdkInitFailedSDK 初始化失败
10007ErrSdkRuntimeSDK 运行时错误(含"另一个会话进行中")
10008ErrAcquisitionTimeout采集超时(30 秒超时)
10012ErrUserTokenInvalidToken 无效或已过期(会回调
10016ErrLicenseValidationFailed授权证书验证失败
10017ErrUserNameInvalid用户名格式不正确
10018ErrUserIdInvalid用户 ID 格式不正确
10019ErrPhoneInvalid电话号码格式不正确
10020ErrAppDisabled应用被禁用
10021ErrUserNotExist用户不存在(会回调
10022ErrTenantRegistrationDisabled租户后台关闭了 APP 端注册入口
10023ErrTenantPhoneAlreadyExists手机号已被同租户其它用户占用
10024ErrTenantPalmRegistrationDisabled租户后台关闭了 APP 端手掌注册
注册模式结果码
结果码枚举开发说明
10100ErrLivenessFailed活体检测失败
10101ErrQualityFailed质量检查失败
10102ErrLivenessVideoFailed活体视频验证失败(服务端判定)
10103ErrAlreadyBind该手掌已注册
10104ErrHighSimilarity与已有用户高度相似
10105ErrLivenessVideoCaptureFailed客户端本地活体视频录制失败(浏览器不支持 / recorder 中途失活)
识别模式结果码
结果码枚举说明
10200ErrUserNotRecognized用户未识别
核验模式结果码
结果码枚举说明
10300ErrTargetUserNotFound待验证用户不存在
10301ErrTargetUserUnregistered待验证用户未注册掌纹
10302ErrTargetUserPalmDirectionUnregistered待验证用户未注册当前手掌方向
网络结果码
结果码枚举说明
10401ErrUnauthorized网关未认证访问(会回调
10500ErrNetwork网络错误
核验记录上报结果码

管理模块在每次识别/核验后会向 create_mobile_verification_record 上报一条核验记录(携带 ResultCode + FailReason),与 native SDK 行为一致。上报的 ResultCode 取值策略:

  1. 命中黑名单 → 50005
  2. 采集阶段的透传码 → 原样上报(10002 / 10008 / 10100 / 10101 / 10102 / 10105
  3. 业务成功 → 0
  4. 其它失败 → 按模式兜底:识别 50003,核验 50002

上报为实时触发、失败即止:失败仅记日志后吞掉,不重试、不入队,绝不阻塞主流程。以下码可能出现在 result 或后台流水中:

结果码枚举说明
50002ErrCompareFailed核验业务失败兜底 —— 未匹配且无更具体错误码(仅用于上报)
50003ErrRecognitionFailed识别业务失败兜底 —— 未拿到 userId 且无更具体错误码(仅用于上报)
50005ErrBlacklistHit命中活体黑名单,掌纹已被后台标记为拒绝准入。SDK 会将其作为 result 回调,同时把业务数据降级(isMatch=false / 识别 userId 置空)以避免宿主基于旧数据继续处理

架构

Host Page (您的业务页)
└─ PalmMobileManager.start(params, callback?) // 对齐 Android/iOS 同名 API
└─ <iframe src="https://sdk.xxx.com/palm_h5/embed/" allow="camera; microphone">
└─ Manager View → Acquisition View
└─ getUserMedia + wasm 推理 + Tencent PalmAI Platform
←── postMessage { ns:'palm-mobile-manager', v:1, msg:{ type:'result', payload } } ──
  • Loader ↔ Embed 严格双向 origin 校验:宿主页的其它 iframe 无法伪造结果。
完整时序图(PlantUML,点击展开)
@startuml
!theme vibrant
title Palm Mobile Manager (Web) — v2.4.0

participant "Host Page\n(customer page)" as Host

box "SDK (loader)" #LightCyan
participant "PalmMobileManager.start()" as Loader
end box

box "SDK (embed iframe)\n<SDK Host>/palm_h5/embed/" #LightCyan
participant "Manager View" as ManagerView
participant "Acquisition View\n(camera + wasm)" as AcquisitionView
end box

box "Tencent PalmAI Platform" #LightCyan
participant "SaaS Platform" as SaaSPlatform
participant "PaaS Platform" as PaaSPlatform
participant "Object Storage" as Storage
end box

note left of Host
**Params** (aligned with Android/iOS same-named fields):
- token, userId, userName, phoneNo (required)
- mode: registration | verification | recognition
- targetUserId (verification only)
- enableManager (default true)
- palmDirection (default unspecified)
- appId, customHeaders
end note

Host ->> Loader: PalmMobileManager.start(params, callback?)
activate Loader

Loader ->> ManagerView: <<create iframe>> + postMessage(start, params)
activate ManagerView
note right of Loader
Loader only hosts the iframe and relays
the protocol; it never touches the
camera / wasm directly.
Origin checks prevent cross-iframe
message forgery.
end note

alt enableManager == true
group User Management
ManagerView ->> SaaSPlatform: DescribeMobileUser(userId)
activate SaaSPlatform
alt User Exists
SaaSPlatform -->> ManagerView: UserInfo (palmState, ...)
else User Not Found
SaaSPlatform -->> ManagerView: Error: UserNotFound
ManagerView ->> SaaSPlatform: CreateMobileUser(userId, userName, phoneNo)
SaaSPlatform -->> ManagerView: UserInfo
end
deactivate SaaSPlatform
end

note over ManagerView
Render UI based on mode.
Wait for user to start acquisition.
end note

ManagerView ->> AcquisitionView: start(params)
else enableManager == false
Loader ->> AcquisitionView: start(params) // skip Manager View
end
activate AcquisitionView

note right of AcquisitionView
getUserMedia + libpag UI
+ wasm inference (palm detect / liveness / quality)
end note

group License Validation
AcquisitionView ->> PaaSPlatform: DescribeMobileLicense
activate PaaSPlatform
PaaSPlatform -->> AcquisitionView: License
deactivate PaaSPlatform
end

group Palm Acquisition
AcquisitionView ->> PaaSPlatform: CreateMobilePalmVideoURL
activate PaaSPlatform
PaaSPlatform -->> AcquisitionView: { videoUrl, videoFileId }
deactivate PaaSPlatform
AcquisitionView ->> Storage: PUT video
Storage -->> AcquisitionView: 200 OK

alt mode == REGISTRATION
AcquisitionView ->> PaaSPlatform: RegisterMobilePalm(rgbImage, videoPath)
PaaSPlatform -->> AcquisitionView: RegistrationResult
else mode == RECOGNITION
AcquisitionView ->> PaaSPlatform: SearchRgbPalm(rgbImage, videoPath)
PaaSPlatform -->> AcquisitionView: { userId, score, palmDirection }
else mode == VERIFICATION
AcquisitionView ->> PaaSPlatform: ComparePalm(rgbImage, targetUserId, videoPath)
PaaSPlatform -->> AcquisitionView: { isMatch, score, palmDirection }
end
end

AcquisitionView -->> ManagerView: Result(code, message, data)
deactivate AcquisitionView

opt enableManager && (mode == RECOGNITION || mode == VERIFICATION) && directionCode != 0
ManagerView ->> SaaSPlatform: QueryLiveBlacklist(userId, palmDirection)
activate SaaSPlatform
SaaSPlatform -->> ManagerView: LiveBlacklistInfos
deactivate SaaSPlatform
alt blacklist hit
note right of ManagerView
Rewrite result to ErrBlacklistHit (50005),
downgrade business data (isMatch=false / userId=""),
aligned with native applyBlacklistThenReport.
Query failure falls through — availability first.
end note
end
end

opt enableManager && (mode == RECOGNITION || mode == VERIFICATION)
note right of ManagerView
reported ResultCode resolution:
blacklist -> 50005
pass-through -> 10002/10008/10100/10101/10102/10105 as-is
biz success -> 0
otherwise -> fallback (recognition 50003 / verification 50002)
end note
ManagerView ->> SaaSPlatform: CreateMobileVerificationRecord(ResultCode, FailReason)
activate SaaSPlatform
alt success
SaaSPlatform -->> ManagerView: Ack
else failure (any)
SaaSPlatform -->> ManagerView: Error
note right of ManagerView
Fire-and-forget: failure is logged
and swallowed, never retried.
end note
end
deactivate SaaSPlatform
end

ManagerView -->> Loader: postMessage(result)
deactivate ManagerView
Loader -->> Host: Promise resolve / callback(result)
deactivate Loader

note left of Host
**Result**:
- code: number (0 = success)
- message: string
- data: RegistrationData | RecognitionData | VerificationData

**App-facing callback codes** (enableManager=true):
| 0 | Success or user exit |
| 10001 | Invalid parameters |
| 10012 | Token invalid/expired |
| 10021 | User not found on management page |
| 10401 | Gateway auth failed |

Recognition / verification may also surface
50005 (ErrBlacklistHit); acquisition-stage codes
such as 10024 (ErrTenantPalmRegistrationDisabled)
are likewise passed through.

When enableManager=false, the host must dispatch
the full ResultCode set itself.
end note

@enduml

安全警告

生产环境安全要求

严禁在生产环境的浏览器代码中硬编码任何平台账户密钥!

浏览器代码对所有终端用户可见,泄露平台账户密钥会将您的账户凭证暴露给所有用户,攻击者可利用这些密钥攻击您的服务,造成严重损失。所有涉及平台密钥的调用(如 CreateAccessToken / CreateUser)必须在您的服务端完成,浏览器只接收服务端下发的短期 AccessToken

正确做法(生产环境):

管理模块

采集模块

会话唯一性

Web 端同一时刻只允许一个 SDK 会话。并发调用 PalmMobileManager.start() 会立即以 ErrSdkRuntime (10007) 拒绝,避免多 iframe 同时争抢摄像头。

测试环境快速启动

仅用于本地开发 / 内部测试 / 隔离 Demo 环境,演示如何在浏览器直接使用后端下发的测试 Token:

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<title>刷掌 H5 测试页</title>
</head>
<body>
<button id="startBtn">开始刷掌</button>
<pre id="result"></pre>

<script src="https://<sdk-host>/palm_h5/loader/palm-mobile-manager.js"></script>
<script>
// [仅供测试] 直接把后端签发的测试 Token 写在页面里
// 警告:生产环境中,Token 必须由后端在用户会话内动态下发
const USER_TOKEN = 'eyJhbGciOi...'; // 由后端 CreateAccessToken 提前签发
const APP_ID = 0; // 替换为服务方分配的 AppId
const USER_ID = 'YourUserId';
const USER_NAME = 'YourUserName';
const PHONE_NO = '(+86)13088888888';
const MODE = 'registration'; // 'registration' | 'verification' | 'recognition'

const { PalmMobileManager } = window.PalmMobileManager;
const resultEl = document.getElementById('result');

document.getElementById('startBtn').addEventListener('click', async () => {
try {
const result = await PalmMobileManager.start({
token: USER_TOKEN,
appId: APP_ID,
userId: USER_ID,
userName: USER_NAME,
phoneNo: PHONE_NO,
mode: MODE,
});
resultEl.textContent = JSON.stringify(result, null, 2);
} catch (err) {
resultEl.textContent = `Error: ${err?.code ?? ''} ${err?.message ?? err}`;
}
});
</script>
</body>
</html>

后续步骤与支持

  • 获取技术支持: 如果在集成过程中遇到任何问题,请联系您的技术支持代表。