As per mautic developer documentation,I am connecting to mautic basic authorization through custom php using curl locally but it is redirecting me to mautic login page but in my view this is not the correct response.......I want to know whats the correct response of this basic authorization?
$login = 'admin';
$password = '123456';
$url = 'http://127.0.0.1/mautic/'; //localhost
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_HTTPHEADER,
array(
"Authorization: Basic " . base64_encode($login . ":" . $password)
));
$status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$result = curl_exec($ch);
print_r(curl_exec($ch));
curl_close($ch);
Also i want to know is Basic Authentication in Mautic different from Oauth2 authorization?