When backend APIs are used, due to requirements for stability and regional isolation of resources, we first need to use COS links to replace all files to be uploaded, and the Tencent Cloud backend will then download required files via HTTP GET requests based on these links.
/Note: If you have not activated COS or don't know how to use it, but you want to complete the integration quickly, see the Best Practices first./
The input links must meet the following requirements:
ap-singaporeas the region, the link should be like this: https://
If you do not need to use your COS buckets, we provide a separate API CreateUploadUrl to help you temporarily store resources and generate addressable links:
DetectReflectLivenessAndCompare) and region (such as
HTTP PUTmethod based on the returned
ResourceUrland the calculated
The `CreateUploadUrl` API provided by us does not support directly deleting data, and the data will be cleaned on a regular basis (per two hours currently). If you pursue a more rigorous and safer practice, we recommend you use your COS buckets, and take some precautions for the objects to upload after you use the API.
The Content-MD5 is used to provide content integrity check to prevent your object from being overwritten. Even if you use the same object or link in multiple comparison requests, our backend still returns a low similarity result, and you may be unaware of this error. Therefore, you need to calculate MD5 with your backend, which is also true in the SDK case as the SDK doesn’t provide an MD5 check for the reason of backend disorder.
invalid resourceUrl. In this case, check whether the input URL meets the COS domain name requirement stated in the # Input Requirements.
FailedOperation.DownLoadError. In this case, check whether the input URL is directly accessible from a public network.
MD5 Error. In this case, check whether the content downloaded via the URL is same as what you calculated. For example, the
DetectReflectLivenessAndCompareAPI needs two different URLs.
Other errors that are not easy to be identified during integration may be content errors, such as invalid LiveData in the
DetectReflectLivenessAndCompare API or the error
FailedOperation.LifePhotoDetectFaces. The cause may be that you need to upload the binary data but not the Base64 data of the image.
Some inevitable algorithm problems may appear after successful integration of the service. If this is the case, you can record the returned RequestIDs and your request parameters, and [contact us](https://www.tencentcloud.com/zh/contact-us).
Some APIs return images. For example,
BestFrame. We do transfer these images with short-term URLs. You need to download or transfer these images in time before we clear them.