From 04a8c56ad65b68aaab01ef02186785da331f7df9 Mon Sep 17 00:00:00 2001 From: hailin Date: Fri, 2 Jan 2026 08:05:08 -0800 Subject: [PATCH] fix(identity): use correct Aliyun API for ID card verification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change API from Id2MetaStandardVerify to Id2MetaVerify for two-factor identity verification (name + ID card number). The previous API was returning error 440 (no permission). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../external/kyc/aliyun-kyc.provider.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/services/identity-service/src/infrastructure/external/kyc/aliyun-kyc.provider.ts b/backend/services/identity-service/src/infrastructure/external/kyc/aliyun-kyc.provider.ts index ceb7f274..76c8c093 100644 --- a/backend/services/identity-service/src/infrastructure/external/kyc/aliyun-kyc.provider.ts +++ b/backend/services/identity-service/src/infrastructure/external/kyc/aliyun-kyc.provider.ts @@ -102,8 +102,8 @@ export class AliyunKycProvider { /** * 二要素验证:姓名 + 身份证号 - * 使用阿里云 Id2MetaStandardVerify API - * 文档: https://help.aliyun.com/zh/id-verification/api-cloudauth-2019-03-07-id2metastandardverify-infor-verify + * 使用阿里云 Id2MetaVerify API (身份证二要素核验) + * 文档: https://help.aliyun.com/zh/id-verification/developer-reference/api-cloudauth-2019-03-07-id2metaverify */ async verifyIdCardTwoFactor( realName: string, @@ -123,14 +123,14 @@ export class AliyunKycProvider { } try { - // 调用阿里云身份二要素标准版核验 API (Id2MetaStandardVerify) - // 文档: https://help.aliyun.com/zh/id-verification/api-cloudauth-2019-03-07-id2metastandardverify-infor-verify + // 调用阿里云身份二要素核验 API (Id2MetaVerify) + // 文档: https://help.aliyun.com/zh/id-verification/developer-reference/api-cloudauth-2019-03-07-id2metaverify // 参数说明: - // - ParamType: 加密方式 (normal=明文) + // - ParamType: 加密方式 (normal=明文, md5=MD5加密, sm2=SM2加密) // - UserName: 姓名 // - IdentifyNum: 身份证号 const params = { - Action: 'Id2MetaStandardVerify', + Action: 'Id2MetaVerify', Version: '2019-03-07', Format: 'JSON', ParamType: 'normal',