Error "You have sent an invalid request."

Hi Github community

I am module developer for open source XOOPS CMS and I want to create a module, which is listing all repositories from our XOOPS repositories.
For this job I created following PHP code:

$ch = \curl_init();
//set the url, number of POST vars, POST data
\curl_setopt($ch, \CURLOPT_URL, $url);
\curl_setopt($ch, \CURLOPT_HTTPAUTH, 'token ’ . $this->tokenAuth);
\curl_setopt($ch, \CURLOPT_USERPWD, $this->userAuth . ‘:’ . $this->tokenAuth);
\curl_setopt($ch, \CURLOPT_CUSTOMREQUEST, ‘GET’);
\curl_setopt($ch, \CURLOPT_RETURNTRANSFER, true);
\curl_setopt($ch, \CURLOPT_CONNECTTIMEOUT, 25);
\curl_setopt($ch, \CURLOPT_TIMEOUT, 25);
\curl_setopt($ch, \CURLOPT_USERAGENT, $this->userAuth);
if ($this->debug) {
\curl_setopt($ch, \CURLOPT_VERBOSE, true);
}
\curl_setopt($ch, \CURLOPT_SSL_VERIFYHOST, false);
\curl_setopt($ch, \CURLOPT_SSL_VERIFYPEER, false);
\curl_setopt($ch, \CURLOPT_POST, 1);
$result = \curl_exec($ch);
$info = \curl_getinfo($ch);

    if (($errMsg = \curl_error($ch)) || !\in_array((int)$info['http_code'], [200, 201], true)) {
        $error = $throwError;
    }
    \curl_close($ch);

if I execute this code from local WAMP server it works fine, and I get the list of the repositories.
If I execute the same code from web (e.g. https://xoops.org) I get following error:
grafik

if I enter the request url (e.g. https://api.github.com/orgs/XoopsModules25x/repos?per_page=100&page=1) directly in web browser I get the list.

have someone an idea where the problem is?

thanks
Goffy