0

i have tried to connect to boondmanager to retrive some data from their active APIs yet i seem to get a 401 error with:

{ "meta": { "version": "7.2.1.1", "isLogged": false, "language": "en" }, "errors": [ { "status": "401", "code": "401", "detail": "HTTP 401 (GET /api/dashboard)", "title": 401 } ] } as a return message in my page.

I use cUrl and php to code my project,

$curl = curl_init();

curl_setopt_array($curl, array(

  CURLOPT_URL => "https://ui.boondmanager.com/api/dashboard",

  CURLOPT_RETURNTRANSFER => true,

  CURLOPT_SSL_VERIFYHOST => false,

  CURLOPT_SSL_VERIFYPEER => false,


  CURLOPT_HTTPHEADER => array(

    "Authorization: Basic " . base64_encode("email:password")

  ),

));

$response = curl_exec($curl);

$err = curl_error($curl);

curl_close($curl);

if ($err) {

  echo "cURL Error #:" . $err;

} else {

  echo $response;

}
anesben
  • 1
  • 1
  • A 401 error indicates an issue with authentication. Try switching to a different authorization method: https://stackoverflow.com/a/58929415/5980481 – David Nov 21 '19 at 13:33
  • hey david, i finally found the reason behind this error, my accound didn't have the right to access this url, so it sent me the 401 error, thank you for your return. – anesben Nov 22 '19 at 14:06

0 Answers0