Using OCR.Space from Microsoft Flows : Bad Request - Request Too Long

Hi all !

I am trying to use OCR.Space within a Microsoft Flows.
I am testing the recognition of the jpg file provided in the code examples provided (

I can successfully use the API using Postman with my personal apikey and the “base64image” parameter corresponding to that image.

When I try to call the API with a Microsoft Flows HTTP Post request with the exact same parameters, I fail with this error message :
Bad Request - Request Too Long
HTTP Error 400. The size of the request headers is too long.

Any idea on what is going wrong or how I could go further ?

Hi, can you please add some more details (maybe screenshots) on how you integrate the OCR API with Flow exactly?

If this is something you do not want to post in the forum, you can also email it to us via team (AT)

Hi and thanks for you answer !

I tried several different ways to declare the request content with always diffrent errors.

Here are the screenshots of my last try (both Successfull Postman Request and failing Flows Request) :

The failing test ends on an Internal Server Error after “4 retries occured”.

I guess that I am not formating the POST message correctly, maybe the content-type is not well declared …

As a test: If, instead of the base64image string, you use a simple URL to an image with the url parameter), does it work then?

Same result with the following parameters :



I noticed the use by Postman of a “boundary” in the header.
I get no better results trying to use the exact same code Postman sends :

Have you been able to get a workaround for this please? I have tried all the above and get similar errors. Can you advice the reason of error, or perhaps if we can use plain JSON as content type to fire the POST requests, may be it would be simpler to work with.

Thank you