Help Center/ Optical Character Recognition/ FAQs/ SDK/ Why Does the Project ID Fail to Be Obtained?
Updated on 2024-06-21 GMT+08:00

Why Does the Project ID Fail to Be Obtained?

Symptom

The following error information is displayed during SDK calling:

INFO com.huaweicloud.sdk.core.HcClient - project id of region 'ap-southeast-2' not found in BasicCredentials, trying to obtain project id from IAM service: https://iam.myhuaweicloud.com

Possible Causes

The project ID under the endpoint corresponding to the service being called is not generated.

Solution

  1. On the My Credentials page, check whether the project ID of the endpoint is generated.
  2. On the OCR console, switch the endpoint to that where the service is called. Then, go to the My Credentials page to view the project ID.
    Figure 1 Selecting an endpoint
    Figure 2 Project ID