Azure Form Recognizer - HTTPRequest

Hi there,

I can’t use the package in Marketplace due to version incompatibility. For this reason, I’m trying to call API from UiPath.WebAPI.Activities. However, the result is “Invalid input file.”

Here is my configuration for HTTP Request:

Headers:
Content-Type: application/pdf
Ocp-Apim-Subscription-Key: subkey

Method: POST

Attachments

Can you please help?

@taha.sonmez

Can you share the documentation link you are following?

Like end point etc.,

Thanks

Hi,

Of course. API reference

Try renaming attachment name: from file to source

image

Hi,

Thank you for your help.

I renamed the ‘name’ but same error throwed.

Where are you receiving that error? in UiPath Studio? or as part of the response?

Can you test and provide values from output (Result and StatusCode)?

image

Hi,

The result is:

Status Code: 400 Response: {“error”:{“code”:“1000”,“message”:“Invalid input file.”}}

I don’t know for sure but you can try renaming attachment as data instead of file.

Some post also recommend to check if you are using your own endpoint:

Hi there,

Yes I am using my own endpoint. I have tried to call API from Postman; there is no problem with that.

It looks like Microsoft does not accept the file format of UiPath.WebAPI.Activities…

I think it is possible. It’s a powerful and versatile activity, i’ve used it many times. Can you provide screenshot of all properties?

Where are you setting Content-Type?

Hi,

Content-Type and Ocp-Apim-Subscription-Key in headers
File path is in Attachments
the rest are all blank