Not to sounds like a jerk, but honestly... it tells you exactly... the end point has moved permanently. Id advise looking over their api documentation or allow redirects within curl. EG: curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
Jan 22, 2018
4
Level 1
301 moved permanently
why i get this message when i deal with this api https://apidocs.tokeet.com/ i deal with Tasks module . this is my code in laravel
public function test1(){
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://capi.tokeet.com/v1/task?account=my-id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: my-token"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
//dd($response);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
}
i get this response
301 Moved Permanently nginx/1.12.0
Level 18
Please or to participate in this conversation.