401 Unauthorised

Posted in General by Karl B Tue Aug 28 2018 13:38:06 GMT+0000 (UTC)·Viewed 102 times

So I have a php script that will grab info of a user with their token (if they willingly give it ofc) So the code is $ch = curl_init($url); $options = array( CURLOPT_RETURNTRANSFER => true, // return web page CURLOPT_HEADER => false, CURLOPT_FOLLOWLOCATION => false, // follow redirects // CURLOPT_ENCODING => "utf-8", // handle all encodings CURLOPT_AUTOREFERER => true, // set referer on redirect CURLOPT_CONNECTTIMEOUT => 20, // timeout on connect CURLOPT_TIMEOUT => 20, // timeout on response CURLOPT_POST => 1, // i am sending post data CURLOPT_POSTFIELDS => $request, // this are my post vars CURLOPT_SSL_VERIFYHOST => 0, // don't verify ssl CURLOPT_SSL_VERIFYPEER => false, // CURLOPT_VERBOSE => 1, CURLOPT_HTTPHEADER => array( "Authorization: $token" ) I still get 401 I have even tried my own token then I visited the url manually and it worked perfectly
  
Markdown is allowed