Skip to Content
硬件接入设备 APIdeviceChangePin
本页目录

deviceChangePin

修改设备 PIN 码

用户主动请求后,打开设备 PIN 修改流程。受保护步骤由用户在设备上完成,不要收集或记录真实设备 PIN 来代替这个流程。

const result = await HardwareSDK.deviceChangePin(connectId, params);

参数

可选通用参数

  • remove - 可选 boolean。false 修改 PIN;true 请求在支持的 Protocol V1 设备上移除 PIN。Protocol V2 拒绝 remove: true。

示例

const result = await HardwareSDK.deviceChangePin(connectId, { remove: false }); if (!result.success) throw new Error(result.payload.error);

返回结果

{ success: true, payload: { message: string } }

错误

{ success: false, payload: { error: string, // 错误信息 code?: string | number // 错误码 } }
最后更新于