Serverinfo @ 18.0.3.0 no longer accessable after Upgrade

hey, I made a little stats page for version 17 in PHP. After upgrading to version 18, this unfortunately no longer works. The login screen has apparently been revised.
Itā€™s about this API: https://domain.tld/ocs/v2.php/apps/serverinfo/api/v1/info

My query works like this (in PHP):
$headers = array (
ā€˜Content-Type: application / jsonā€™,
ā€˜Authorization: Basicā€™. base64_encode ("(username):(password)")
);
$c = curl_init (ā€˜https://cloud.barner.online/ocs/v2.php/apps/serverinfo/api/v1/info?format=jsonā€™);
curl_setopt ($c, CURLOPT_HTTPHEADER, $headers);
curl_setopt ($c, CURLOPT_RETURNTRANSFER, 1);
$url = curl_exec ($c);
curl_close ($c);

What do I need to change, that my authentication works?

Or can I completely skip the authentication for serverinfo? That would make it much faster!