tencent cloud

文档反馈

接入后验证

最后更新时间:2023-12-20 17:27:27
    当您通过上述步骤完成 API 接入后,可通过如下方式验证图片内容检测服务是否接入成功。

    接入成功

    若 Response 回参没有“Error”字段且正常返回业务参数,则说明 IMS 接口接入成功,示例如下所示:
    {
    "Response": {
    "RequestId": "a61237dd-c2a0-43e7-a3da-d27022d39ba7",
    "DataId": "a61237dd-c2a0-43e7-a3da-d27022d39ba7",
    "BizType": "test_1001",
    "Suggestion": "Block",
    "FileMD5": "",
    "Label": "Porn",
    "SubLabel": "SexBehavior",
    "Score": 90,
    "LabelResults": [
    {
    "Scene": "Porn",
    "Suggestion": "Block",
    "Label": "Porn",
    "SubLabel": "SexBehavior",
    "Score": 90,
    "Details": []
    }
    ],
    "ObjectResults": [
    {
    "Scene": "QrCode",
    "Suggestion": "Block",
    "Label": "Ad",
    "SubLabel": "",
    "Score": 100,
    "Names": [
    "QRCODE"
    ],
    "Details": [
    {
    "Id": 0,
    "Name": "QRCODE",
    "Score": 100,
    "Location": {
    "X": 155.01746,
    "Y": 396.01746,
    "Width": 769.9824,
    "Height": 769.98254,
    "Rotate": 0
    }
    }
    ]
    }
    ],
    "OcrResults": [],
    "LibResults": [],
    "Extra": ""
    }
    }

    接入失败

    若 Response 回参显示“Error”字段,则说明接入失败,以下为 signature 校验失败的示例:
    {
    "Response": {
    "Error": {
    "Code": "AuthFailure.SignatureFailure",
    "Message": "The provided credentials could not be validated. Please check your signature is correct."
    },
    "RequestId": "ed93f3cb-f35e-473f-b9f3-0d451b8b79c6"
    }
    }
    其中 Error 中的 Code 表示错误码,Message 表示错误的具体信息,详情请参见 错误码
    联系我们

    联系我们,为您的业务提供专属服务。

    技术支持

    如果你想寻求进一步的帮助,通过工单与我们进行联络。我们提供7x24的工单服务。

    7x24 电话支持