Troubleshooting Common Issues with the Unified ID Card OCR API

Introduction
When integrating the Unified ID Card OCR API, various issues can arise, such as invalid parameters, unsupported card types, or timeout errors. This guide provides solutions for common issues and error messages.

1. Invalid Card Type

Error Message: PARAMETER_ERROR - Invalid card type
Cause: The provided cardType is not valid or supported by the API.
Solution: Check that the cardType is one of the supported types (e.g., ID_CARD, PASSPORT, DRIVING_LICENSE). Use the correct type in your request.

2. Unsupported Region

Error Message: PARAMETER_ERROR - Unsupported country or region
Cause: The region or country is not supported by the API.
Solution: Ensure the region parameter is correctly set (e.g., ID for Indonesia). Verify that the region is supported by the API.

3. Invalid Image Format

Error Message: PARAMETER_ERROR - Invalid image format
Cause: The uploaded image is in an unsupported format.
Solution: Convert the image to a supported format, such as JPEG or PNG. Ensure that the request content type is set to image/jpeg or image/png.

4. Image Size Too Large

Error Message: PARAMETER_ERROR - Invalid image size
Cause: The image file exceeds the size limit of 2 MB or has invalid dimensions.
Solution: Reduce the image file size to under 2 MB and ensure the dimensions are between 256x256 and 4096x4096 pixels.

5. OCR No Result

Error Message: OCR_NO_RESULT - Unable to find any available field in the uploaded picture
Cause: The OCR was unable to extract any information from the image.
Solution: Ensure the image quality is clear, without obstructions, and that the card is captured properly. Verify that the card is positioned correctly in the image.

6. Request Timeout

Error Message: REQUEST_TIMEOUT - Request timeout
Cause: The request took too long to process, possibly due to network issues.
Solution: Retry the request after a short delay. Ensure that your network connection is stable.

7. Parameter Should Not Be Empty

Error Message: PARAMETER_ERROR - Parameter should not be empty
Cause: Required parameters are missing in the request.
Solution: Ensure that all mandatory parameters, such as region, cardType, and at least one image (frontFile or backFile), are included in the API request.

Conclusion
By addressing these common issues and following the recommended solutions, you can resolve most problems encountered when using the Unified ID Card OCR API.

 

Further Assistance

If you continue to experience issues despite following the guidelines provided, please contact our support team for further assistance:

Was this article helpful?
29 out of 30 found this helpful

Comments

0 comments

Please sign in to leave a comment.