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
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
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
support
Handset Detection
Hi
I have the same error message
My request:
XXXXXXXMozilla/5.0 (Windows; U; Windows NT 6.0; pl; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3217.153.12.122product_info/www/htmltext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8ISO-8859-2,utf-8;q=0.7,*;q=0.7gzip,deflatepl,en-us;q=0.7,en;q=0.3max-age=0keep-alivebeta.bluehost.pl300Mozilla/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/bin217.153.12.12250413/www/html/test.php10.123.123.124noc@bluemedia.plbeta.bluehost.pl80Microsoft-IIS/6.0SOV6XAp7e3wAASBXM7ECGI/1.1HTTP/1.1GET/test.php/test.php/www/html/test.php/test.php1222998620
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
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
support
Handset Detection
Same issue, guys. Any luck getting to the root of the issue?
Comments
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>