Cloud Development Kit

InvalidApplicationKeyException

Hi, in using the websocket API for the CDK I am getting an InvalidApplicationKeyException when sending a message that I copied from the text demo. 

I am using the url 'wss://webdemoapi.myscript.com/api/v3.0/recognition/ws/text'

The connection is successful, and the application key (first) message returns and init/success response.

After sending the next message with the content, I get an error response: {"type":"error","error":{"result":{"applicationKey":"myapplicationkeyishere","error":"InvalidApplicationKeyException","status":"error"}}}

Thoughts welcome!


The content of the message is more or less a scribble, so it is safe to post here, but I don't think that it is to blame for the error.

{

 "type" : "start",

 "textParameter" : {

  "textProperties" : {

   "textCandidateListSize" : 1

  },

  "language" : "en_US",

  "textInputMode" : "CURSIVE",

  "resultDetail" : "TEXT"

 },

 "inputUnits" : [{

   "textInputType" : "MULTI_LINE_TEXT",

   "components" : [{

     "type" : "stroke",

     "x" : [391, 388, 385, 383, 381, 378, 375, 370, 368, 366, 363, 361, 358, 356, 354, 352, 350, 346, 344, 342, 340, 338, 336, 335, 332, 330, 329, 327, 326, 325, 323, 323, 322, 321, 321, 321, 321, 321, 321, 322, 325, 328, 331, 334, 337, 341, 344, 347, 350, 357, 360, 363, 366, 369, 375, 378, 381, 384, 387, 395, 399, 402, 404, 411, 413, 428, 429, 432, 434, 436, 438, 439, 441, 443, 446, 447, 449, 451, 453, 454, 456, 458, 459, 455, 452, 451, 446, 444, 442, 440, 435, 434, 432, 430, 425, 424, 422, 419, 417, 415, 414, 413, 411, 410, 408, 407, 406, 405, 404, 404, 403, 406, 409, 412, 415, 418, 422, 425, 428, 431, 435, 438, 440, 443, 445, 447, 451, 453, 456, 458, 461, 463, 465, 468, 470, 472, 474, 475, 475, 472, 470, 469, 467, 466, 465, 463, 462, 460, 459, 462, 468, 472, 476, 482, 486, 500, 503, 506, 520, 524, 538, 542, 546, 550, 553, 549, 544, 541, 539, 536, 529, 526, 521, 517, 514, 511, 508, 504, 501, 498, 499, 501, 505, 508, 511, 515, 519, 522, 525, 528, 531, 534, 537, 540, 543, 546, 550, 554, 557, 560, 563, 567, 570, 574, 577, 579, 582, 583, 585, 587, 589, 591, 592, 594, 595, 591, 589, 587, 585, 581, 577, 575, 571, 568, 564, 562, 559, 557, 553, 549, 546, 544, 541, 540, 536, 534, 531, 529, 527, 524, 522],

     "y" : [160, 163, 165, 168, 171, 174, 177, 183, 186, 189, 192, 195, 199, 202, 205, 208, 211, 217, 221, 224, 227, 230, 233, 236, 240, 244, 247, 250, 254, 257, 260, 263, 266, 269, 272, 276, 279, 282, 285, 288, 292, 293, 294, 294, 294, 294, 293, 292, 290, 286, 284, 282, 280, 278, 274, 272, 270, 268, 266, 259, 256, 253, 250, 242, 239, 219, 216, 211, 208, 205, 202, 199, 196, 193, 190, 187, 184, 181, 178, 174, 171, 167, 164, 168, 171, 174, 181, 185, 188, 192, 202, 205, 208, 212, 224, 228, 232, 238, 244, 249, 252, 255, 260, 264, 267, 270, 273, 276, 279, 282, 285, 286, 285, 283, 280, 278, 275, 272, 269, 266, 263, 259, 256, 253, 250, 247, 241, 237, 233, 230, 225, 222, 218, 213, 209, 206, 203, 200, 203, 209, 214, 217, 224, 227, 230, 238, 241, 250, 253, 251, 246, 243, 240, 236, 234, 226, 225, 223, 217, 216, 210, 209, 207, 205, 204, 207, 212, 215, 218, 221, 228, 230, 234, 237, 238, 240, 241, 242, 242, 242, 245, 249, 253, 255, 257, 258, 259, 260, 261, 261, 261, 261, 261, 261, 261, 261, 260, 259, 258, 257, 256, 254, 253, 250, 247, 244, 241, 238, 235, 232, 229, 226, 223, 220, 217, 222, 226, 230, 234, 240, 245, 248, 253, 257, 262, 265, 268, 271, 276, 281, 286, 289, 293, 296, 301, 304, 308, 311, 314, 316, 313],

     "t" : [4568.840000000001, 4606.13, 4613.495000000001, 4621.650000000001, 4626.515, 4630.735000000001, 4635.56, 4644.255, 4646.070000000001, 4649.49, 4653.405000000001, 4655.455000000001, 4659.400000000001, 4662.37, 4663.45, 4665.950000000001, 4668.525000000001, 4672.435, 4675.58, 4677.845, 4680.570000000001, 4682.85, 4684.945000000001, 4687.485000000001, 4691.175, 4692.425, 4695.610000000001, 4697.425, 4700.970000000001, 4704.420000000001, 4706.81, 4710.1050000000005, 4712.515, 4716.35, 4719.87, 4725.885000000001, 4729.415, 4734.410000000001, 4742.54, 4745.66, 4759.1900000000005, 4765.345000000001, 4775.21, 4780.3550000000005, 4785.415000000001, 4792.7, 4796.385000000001, 4799.460000000001, 4802.445000000001, 4809.865000000001, 4812.505000000001, 4814.905000000001, 4817.4800000000005, 4820.56, 4825.26, 4826.8550000000005, 4829.535000000001, 4831.765, 4834.39, 4842.715, 4846.240000000001, 4849.805000000001, 4851.77, 4860.035000000001, 4861.38, 4878.9800000000005, 4881.68, 4885.3550000000005, 4891.215000000001, 4893.165000000001, 4896.455000000001, 4899.455000000001, 4905.35, 4909.01, 4913.670000000001, 4917.5, 4922.750000000001, 4927.6900000000005, 4934.370000000001, 4942.035000000001, 4947.450000000001, 4959.185, 4967.320000000001, 5025.6050000000005, 5031.43, 5034.84, 5042.915000000001, 5045.755000000001, 5049.64, 5052.575, 5060.835, 5063.695, 5066.02, 5069.695000000001, 5079.27, 5082.280000000001, 5085.365000000001, 5089.8, 5094.435, 5098.88, 5101.56, 5104.61, 5109.590000000001, 5112.435, 5116.02, 5119.4800000000005, 5123.465, 5128.1, 5132.535000000001, 5140.700000000001, 5151.330000000001, 5185.650000000001, 5195.195, 5198.195, 5202.52, 5206.03, 5211.905000000001, 5214.295000000001, 5218.115, 5222.105, 5224.710000000001, 5228.865000000001, 5232.33, 5235.160000000001, 5237.735000000001, 5240.655000000001, 5245.535, 5249.385, 5253.56, 5256.625000000001, 5261.655, 5265.120000000001, 5268.06, 5273.960000000001, 5278.870000000001, 5283.525, 5290.9800000000005, 5298.35, 5358.47, 5376.09, 5380.360000000001, 5383.3, 5392.09, 5395.650000000001, 5398.540000000001, 5408.195, 5411.145, 5424.9, 5433.53, 5491.695000000001, 5509.985000000001, 5515.575, 5520.175, 5526.88, 5530.875000000001, 5541.785000000001, 5543.7300000000005, 5545.405000000001, 5558.475, 5561.635000000001, 5575.295000000001, 5581.21, 5594.235000000001, 5601.450000000001, 5611.3150000000005, 5668.415000000001, 5677.720000000001, 5682.75, 5689.93, 5694.445000000001, 5708.640000000001, 5713.485000000001, 5726.3550000000005, 5731.740000000001, 5735.78, 5742.51, 5746.835000000001, 5758.655, 5765.385, 5789.935, 5864.7300000000005, 5876.345, 5883.76, 5890.215, 5894.765, 5901.135000000001, 5907.265, 5911.115000000001, 5915.095000000001, 5919.580000000001, 5925.540000000001, 5930.245, 5933.64, 5938.675000000001, 5943.34, 5947.045, 5951.635, 5958.395, 5962.630000000001, 5965.475, 5970.895, 5978.570000000001, 5983.5650000000005, 5991.725, 5999.285000000001, 6005.18, 6011.795, 6016.475, 6023.01, 6029.6050000000005, 6034.465000000001, 6042.335, 6048.885, 6059.54, 6070.35, 6139.84, 6143.535000000001, 6149.42, 6153.55, 6161.425, 6165.665000000001, 6170.210000000001, 6174.195, 6177.325000000001, 6182.09, 6183.58, 6186.195000000001, 6190.47, 6192.63, 6197.045, 6200.4400000000005, 6203.015, 6206.115000000001, 6209.47, 6213.965000000001, 6216.550000000001, 6222.015, 6226.04, 6233.675000000001, 6244.74, 6309.160000000001]

    }

   ]

  }

 ]

}


1 Comment

Ok, nevermind, I apparently have an API Key that isn't registered with the app. No idea how I got that, but I can successfully use the one that IS registered with the app.

Login or Signup to post a comment