Forum/Help & Support

API : Invalid Format. Could not parse your query. Is the format ok ?

support
posted this on September 05, 2008 16:35

API : Invalid Format. Could not parse your query. Is the format ok ?
 

Comments

User photo
support
Handset Detection
I am getting the following error when making calls to retrieve handset data: API : Invalid Format. Could not parse your query. Is the format ok ? What am I doing wrong?
September 05, 2008 16:35
User photo
support
Handset Detection
Hi Jimmo, Generally that happens if that the system can't parse your XML or JSON request. Can you post your request here (Just put XXXXXXX for your API key). Thanks. Cheers Richard
September 08, 2008 10:58
User photo
support
Handset Detection
Hi I have the same error message My request: XXXXXXX Mozilla/5.0 (Windows; U; Windows NT 6.0; pl; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 217.153.12.122 product_info /www/html text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 ISO-8859-2,utf-8;q=0.7,*;q=0.7 gzip,deflate pl,en-us;q=0.7,en;q=0.3 max-age=0 keep-alive beta.bluehost.pl 300 Mozilla/5.0 (Windows; U; Windows NT 6.0; pl; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/root/bin 217.153.12.122 50413 /www/html/test.php 10.123.123.124 noc@bluemedia.pl beta.bluehost.pl 80 Microsoft-IIS/6.0 SOV6XAp7e3wAASBXM7E CGI/1.1 HTTP/1.1 GET /test.php /test.php /www/html/test.php /test.php 1222998620 I use CURL to send http call : $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, ''http://c1.handsetdetection.com/devices/detect.xml'); $header['Content-Type']='text/xml'; $header['Content-Length']=strlen($sxml); curl_setopt($ch,CURLOPT_HTTPHEADER,$header); curl_setopt($ch, CURLOPT_POSTFIELDS, $xml); curl_setopt($ch, CURLOPT_TIMEOUT, 10); response: API : Invalid Format. Could not parse your query. Is the format ok ? Could You help me? What am I doing wrong? Thank You.
October 03, 2008 12:01
User photo
support
Handset Detection
Hi Kataryna, Hmm - The XMl looks ok - Can you run another request and then email support@handsetdetection.com. I'll jump in right away and check the logs to workout the problem. Cheers Richard
October 06, 2008 09:14
User photo
support
Handset Detection

Same issue, guys. Any luck getting to the root of the issue?

here in the XML that I send to the server:

<?xml version="1.0" encoding="utf-16" standalone="yes"?>
<request>
  <apikey>[my key here]</apikey>
  <options>product_info, geoip</options>
  <User-Agent>OperaMini</User-Agent>
</request>

and this is what I get in reply:

<?xml version="1.0" encoding="UTF-8" ?><reply><message>API : Invalid Format. Could not parse your qu
ery. Is the format ok ?</message></reply>

November 06, 2008 00:31
User photo
support
Handset Detection
Never mind, solved (bloody .net Encoding issue)
November 06, 2008 04:12
User photo
support
Handset Detection
Self fixing problems - Love it :-) Cheers r
November 06, 2008 07:20