Тема: Help with request in routing-maps
Hi, my name is Andrés Apodaca, web developer from Dogo Informatique
I'm trying to make a request to gurtam API with the method gis_get_route (that is not in the Api documentation) but always return me error:1, and i'm logged correctly because i get the SID before send the request to gis_get_route.
According the wialon plataform the request is like this:
the url of the method gis_get_route: https://routing-maps.wialon.com/hst-api … _get_route
The params would be this:
lat1=23.07596999999997&lon1=-104.5470400000002&lat2=22.124219999999788&lon2=-103.19125999999753&flags=1&uid=16466766&sid=031f2ce6032599387dcd547af581c1c0
So, this is the way i make the request in php:
$url = "https://routing-maps.wialon.com/hst-api … 6&sid=".$this->sid;
$data = array('user' => 1, 'password' => 1);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
return $result;
RESPONSE:
result: {"error":1}
¿ Can you indicate me if i'm doing something wrong in the request or if the URL in the request is not correct?
¿ i need some special account privileges to access this request since this is not in the API documentation ?
i would really appreciate it if you could help me with this
Best Regards!