I get my bearer token from an API end point and set the following:
$authorization = \"Bearer 080042cad6356ad5dc0a720c18b53b8e53d4c274\"
Nex
As at PHP 7.3:
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BEARER); curl_setopt($ch,CURLOPT_XOAUTH2_BEARER,$bearerToken);