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?
Srini84
(Srinivas Kadamati)
December 8, 2021, 12:20pm
2
@taha.sonmez
Can you share the documentation link you are following?
Like end point etc.,
Thanks
dokumentor
(Gabriel Marin)
December 8, 2021, 1:13pm
4
Try renaming attachment name: from file to source
Hi,
Thank you for your help.
I renamed the ‘name’ but same error throwed.
dokumentor
(Gabriel Marin)
December 8, 2021, 1:43pm
6
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)?
Hi,
The result is:
Status Code: 400 Response: {“error”:{“code”:“1000”,“message”:“Invalid input file.”}}
dokumentor
(Gabriel Marin)
December 8, 2021, 3:19pm
8
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…
dokumentor
(Gabriel Marin)
December 8, 2021, 7:13pm
10
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