Authentifiation problem to receive the result with cloud ocr sdk

  • 1.4K Views
  • Last Post 21 August 2015
Philippe posted this 19 August 2015

Bonjour,

I try to test the Cloud OCR SDK for a new project.

First, I do a POST request http://login:password@cloud.ocrsdk.com/processImage?language=english&profile=documentConversion&exportFormat=txt (using the t1.TIF image exemple).

I got the /response/task/ id xxxxxxx in return.

Then I do a GET request http://login:password@cloud.ocrsdk.com/getTaskStatus?taskId=xxxxxx with this id.

It's quickly status="complete" and I got the /response/task/ resultUrl, something like this :

http://ocrsdk.blob.core.windows.net/files/64b60bc9-4706-4680-9e0e-cfcce55e310e.result? sv=2012-02-12 &se=2015-08-19T20:00:00Z &sr=b &si=downloadResults &sig=Ob1JQH3I3VhleKoFl2RMCx4j2JBjeo/IFF/d1A2iOlI=

but I can't succeed in use this URL, I have always an error InvalidAuthenticationInfo - Authentication information is not given in the correct format. Check the value of Authorization header.

I try to add login:password in the request : https://login:password@ocrsdk.blob.core.windows.net/... as I do for the first requests, but it does not change anything.

Maybe you can tell me what I do wrong ?

Thanks for your help,

Philippe

Order By: Standard | Newest | Votes
Philippe posted this 20 August 2015

Hello,

Today, I try again the same code (directly adding the login:password in the URL) and it works once on your t1.TIF example file.

But when I tried an other file, I got the same error InvalidAuthenticationInfo. I tried a new time on the t1.TIF and I got the same error !

Strange results, sometimes it works, sometimes not, without any explanation...

I need some help...

Thanks,

Philippe

Oksana Serdyuk posted this 20 August 2015

Please compare my resultUrl generated with my program with yours.

My:

https://ocrsdk.blob.core.windows.net/files/06b40126-680e-478e-b5aa-34666d1295d2.result?sv=2012-02-12&se=2015-08-20T22%3A00%3A00Z&sr=b&si=downloadResults&sig=K%2FEr5IhdWMbZ%2FbXxTJY5qvjfq5i4%2BD2E%2BT%2Bfb%2FJRFho%3D

Your:

http://ocrsdk.blob.core.windows.net/files/64b60bc9-4706-4680-9e0e-cfcce55e310e.result? sv=2012-02-12& se=2015-08-19T20:00:00Z& sr=b& si=downloadResults& sig=Ob1JQH3I3VhleKoFl2RMCx4j2JBjeo/IFF/d1A2iOlI=

I see two differences:

  • there are some extra spaces in your resultUrl, for example after “result?” and after the “&” characters,
  • in my case all characters are encoded, for example the colons “:” are replaced with “%3A”, etc.

Philippe posted this 20 August 2015

Bonjour Oksana,

Thanks for you answer, but :

  • the extra spaces are only a copy problem (I tried to put all the arguments on different lines to make easier to read and the forum put spaces instead of carriage returns). In my program, there are no spaces in the URL.

  • I tried first with the encoded characters (for instance %3A), but as it didn't work, I tried changing this characters with the normal ones. The time it worked, I was with the non encoded characters.

I just tried again several times and I have sometimes the Authentification Error (Signature fields not well formed), sometimes the good result, and I can not find the relationship between the encodage and the password. It is as if it is random !

For my test, when I have not the error, I can see that the OCR result is really good, but I'm wondering how to industrialize it if I have not always the result.

May be you have an other idea ?

Thank you for your help !

Philippe

Oksana Serdyuk posted this 21 August 2015

Hi Philippe,

Could you please send to CloudOCRSDK@abbyy.com the logs from the Fiddler debugger? You can download it for free here: www.telerik.com/fiddler.

Close