Hey Everyone, I am trying to call a POST API using HTTP request header. The API is working fine in POSTMAN but when it comes to UiPath I go an error “Please enter the name of the provider(s)”. While the below is my body of API in which I am passing the providers.
Body: “{‘providers’: ‘mindee’,‘file’:‘C:\InvoiceINV-12-1.png’,‘language’:‘en’,}”
Body Format: application/json
Accept Format: ANY
I am trying to send image file in a body.
Anil_G
(Anil Gorthi)
March 18, 2023, 9:45am
2
@Muhammad_Anas_Baloch
If you are using postman …would suggest click on this icon <\>
. And you would see a curl generated…
Copy the curl and click on import in http request and try…that will populate the request details automatically for you
Cheers
I tried that way too but didn’t worked for me
Hi @Muhammad_Anas_Baloch ,
The providers parameter might be an array of strings instead of a single string.
Anil_G
(Anil Gorthi)
March 18, 2023, 1:45pm
5
@Muhammad_Anas_Baloch
Was the error same?
And can you show the screenshot of postman
Cheers
@Anil_G POSTMAN screenshot
So what should I have to do to resolve the issue Sir?
Hi @Muhammad_Anas_Baloch ,
Try below body in postman
{
“providers”: [“mindee”],
“file”: “C:\InvoiceINV-12-1.png”,
“language”: “en”
}
@Anil_G @ABHIMANYU_THITE1 this is my params for post call
Below is my cURL of POSTMAN which I imported but still the error is same
curl --location --request POST ‘https://api.edenai.run/v2/ocr/invoice_parser ’
–header ‘Content-Type: multipart/form-data; boundary=’
–header ‘Authorization: Bearer MY KEY’
–form ‘providers=“mindee”’
–form ‘file=@“/C:/Users/dell/Download/InvoiceINV-12-1.png”’
–form ‘language=“en”’
In POSTMAN I have to issue, I have issue in UiPath. POSTMAN returning success result.
I am attaching API documentation for your perusal.
API Documentation:
Anil_G
(Anil Gorthi)
March 18, 2023, 2:16pm
11
@Muhammad_Anas_Baloch
If you are sending file then you should send in attachments …fromhttp properties you can find that property…can you please try attaching there
Or below you see attachments right…attach the file there and remove the file prameters from
The body
Cheers
2 Likes
Thank you so much, it worked for me.
1 Like
system
(system)
Closed
March 21, 2023, 2:38pm
15
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.