How to use Postman for testing Cloud OCR SDK requests

Question

How to test API Requests functionality with Posman?

Answer

Postman console helps to send requests to the Cloud OCR SDK and test the functionality.

Step 1) First need to install Posman - go to https://www.postman.com/downloads/ and choose the desired platform among Mac, Windows, or Linux. Click Download.

Step 2) For processing images with Cloud OCR SDK we need to send them to a Server with some parameters:

  • Open Postman
  • Create new Tab
  • Choose Post request
  • Paste the processing URL, which can be found on: https://cloud.ocrsdk.com/Account/Welcome
    Add the method at the end of URL – processImage in our case.

All methods can be found here https://www.ocrsdk.com/documentation/api-reference/
Also, add some parameters for recognition:
language: English, French
textType: normal
Attach the image, that will be sent. Choose File as shown in the screenshot below:
Screenshot example:

- Go to Authorization tab and input the application id and password params, as shown:

mceclip0.png

- Press Send and after copy taskId

Pink arrow points out the result status, which is OK in our case.
Now we need to get results from the task:

  1. Create a new Tab and select Get request.
  2. Input GET request - https://cloud.ocrsdk.com/getTaskStatus (as example)
  3. Open Authorization tab and insert the same credentials.
  4. Open Params tab and add key taskId and its value in the corresponding field, received from the previous request.
  5. Click “Send”

The result will be a link to download the OCR result.
Copy and Paste it into the browser. The result will be downloaded automatically.
Note! The result link may contain one or several & delete all amp; but leave &, otherwise downloading link won’t work

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.