How to test API Requests functionality with Posman?
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 your 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
Attach the image, that will be sent. Note, that you must choose File as shown in the screenshot below!
- Go to Authorization tab and input your application id and password params, as shown:
- 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, which you received from the previous request.
5) Click “Send”
As result, you obtain a link to download the result.
Copy and Paste it into your 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