Hepsiburada api ile çalışıyorum ve token almam gerekiyor. Bir kaç yol denedim destek tarafı'da çok geç ve olumlu birşeyler yazmayınca danışmak istedim.
Daha önce api ile çalışan varsa yardımcı olursa memnun olurum.
Örnek İstek: bu şekilde request yapılması isteniyor.
POST /api/authenticate Host: mpop-sit.hepsiburada.com Content-Type: application/json { "username": "xyz_dev", "password": "XYZ_dev123!", "authenticationType": "INTEGRATOR" }hazırladığım request
$url = 'https://mpop-sit.hepsiburada.com/api/authenticate/'; $ch = curl_init($url); $header = array( 'Content-Type: application/json', 'Authorization: Bearer '. base64_encode('xyz_dev:XYZ_dev123!:INTEGRATOR'), ); curl_setopt($ch, CURLOPT_HTTPHEADER, $header); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); $result = curl_exec($ch); $return=json_decode($result,true); print_r($return);Sonuç: JWT strings must contain exactly 2 period characters. Found: 0
gibi bir hata alıyorum.