Help Center/ Optical Character Recognition/ FAQs/ Error Code/ How Do I Handle the Error APIG.0301?
Updated on 2024-09-23 GMT+08:00

How Do I Handle the Error APIG.0301?

If an error message and error code are returned when an API is called:

  • If the error message "Incorrect IAM authentication information: decrypt token fail" and error code "APIG.0301" are displayed, the token fails to decrypt.

    If the error message "Incorrect IAM authentication information: x-auth-token not found" and error code "APIG.0301" are displayed, X-Auth-Token is not included in the request header.

    If the error message "Incorrect IAM authentication information: token expires, expires_at: xxx" and error code "APIG.0301" are displayed, the token has expired.

    Solution:

    1. Check if the token has expired.
    2. Check if the method used to obtain the token is correct and if the request body information is filled in correctly, and if the token is complete and accurate.
    3. Check if the environment used to obtain the token and the environment where the token is being called are consistent and located in the same region.
    4. Check the account permissions, for example, whether the account is in arrears or frozen.
  • If the error message "Incorrect IAM authentication information: verify aksk signature fail" and error code "APIG.0301" are displayed, AK/SK fails to authenticate.

    Solution:

    1. Check whether the AK/SK pair is correct. For example, the SK for the AK is incorrect; an extra space is entered in the AK/SK pair.
    2. AK/SK authentication errors occur frequently. If an AK/SK pair fails to be authenticated for more than five consecutive times, it is locked for 5 minutes (the AK/SK authentication is considered as an abnormal authentication request within 5 minutes). After 5 minutes, the AK/SK pair is unlocked and re-authenticated.
    3. Check the account permissions, for example, whether the account is in arrears or frozen.