Cloud Development Kit

REST API returning error

I'm trying to use the text recognition API in my program. The URL I'm using is "http://cloud.myscript.com/api/v3.0/recognition/rest/text/doSimpleRecognition.json?".

The input parameters i'm sending are 'applicationKey', 'hmac', and 'textInput'.

The value of textInput is as given in the examples.

textinput = { "textParameter":{ "language":"en_US", "textInputMode":"CURSIVE" }, "inputUnits":[ { "textInputType":"MULTI_LINE_TEXT", "components":[ { "type":"stroke", "x":[ 438, 439, 439 ], "y":[ 319.5, 313.5, 312.5 ] } ] } ] }

I get the error as follows:

HTTP/1.1 400 BadRequest Content-Type: application/json;charset=UTF-8

{ "result": { "message": "Required String parameter 'textInput' is not present" } }

1 Comment

Dear Saurav,


I have just tried to send your request and it works successfully on my side, you just have to replace the key "textinput" with "textInput" (as it is case sensitive).

Optionally, please note you can send your request using https URL as well.


Best regards

Login or Signup to post a comment