Hi,
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
Status Code:400
{“error”:{“code”:“1000”,“message”:“Invalid input file.”}}
1 Like
Hey @darshanbm455
It looks like there is some issue with the file…
Is there any specific format you need to follow please ?
Also, If possible please share the API docs link…
Thanks
#nK
Hey @darshanbm455
I have seen this point in the docs as below…
Alternatively, use `application/json’ type to specify the location (Uri or local path) of the document to be analyzed.
Could you please try with header Content-Type: application/json
Hope this helps
Thanks
#nK
In POSTMAN it worked with application/pdf
1 Like
@darshanbm455 It’s fine. Kindly try the above if it helps…
It will give another error.
400:{“error”:{“code”:“1002”,“message”:“Analyze request is either invalid or missing required parameters. Refer to the API reference and retry your request.”}}
Hey @darshanbm455
Cool. When you tried in postman is it all the same settings…
Could you please just share the screenshots to compare and check please?
Thanks
#nK
Hey @darshanbm455
So you are using binary format. Could you please show the headers of the request please…
Thanks
#nK