Hocam Sizin Veriğiniz Şekilde Nasıl Kullanmam Gerek Acaba Örnek Verebılır Mısınız Birkaç denem yaptım ama
Array ( [timestamp] => 2020-07-07T10:24:55.411+0000 [status] => 401 [error] => Unauthorized [message] => Access Denied [path] => /api/authenticate/ )
Cevap Donuyor. yardımcı Olabılır Mısınız


Larus adlı üyeden alıntı: mesajı görüntüle
$data = array("username" => "asdasd", "password" => "asdasd","authenticationType" => "INTEGRATOR" ); $data_string = json_encode($data); $ch = curl_init('[URL]https://mpop-sit.hepsiburada.com/api/authenticate/[/URL]'); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: ' . strlen($data_string)) ); $result = curl_exec($ch);
şeklinde dener misiniz ? header olarak değil json body olarak istiyor sizden datayı