Updated on 2023-12-19 GMT+08:00

Overview

You can debug API calls using Postman or SDK. This involves subscribing to a service, configuring the environment, authenticating, and constructing a request to call the service.

  1. Subscribing to a service: includes registration and login, IAM account creation (optional), and service subscription. For details, see Subscribing to an OCR Service.
  2. Configuring the environment: You can choose to download Postman or download an SDK.
  3. Authenticating: You can choose Token-based Authentication (Postman environment) or AK/SK-based Authentication (SDK environment). Select an authentication mode based on the environment configured in step 2.
  4. Constructing a request. For details about how to construct a request in the Postman environment, see Making an API Request. For details about how to call an API in an SDK environment, see Optical Character Recognition SDK Reference.

Apart from the preceding two methods, you can also call APIs through API Explorer online debugging. The procedure is as follows:

  1. The API Explorer page is displayed after a service is subscribed to by referring to Subscribing to an OCR Service.
  2. Choose the subscribed service and the corresponding region for the service.
  3. In the Body area, set image or url. Set other parameters based on site requirements. For details about the parameters, refer to the content displayed on the Documentation tab on the right of the page.
  4. Click Debug and check the calling result on Debugging Result on the right.
Figure 1 API Explorer online debugging