Secondly on the same line, the API key that I submit does not need to be base 64 encoded, it is already in the correct format. I hacked the line locally as follows. Not elegant but it works... For some reason removing the encoding all together created other errors.
Typo says 'Basic ' instead of 'Bearer '
Secondly on the same line, the API key that I submit does not need to be base 64 encoded, it is already in the correct format. I hacked the line locally as follows. Not elegant but it works... For some reason removing the encoding all together created other errors.
$args['headers']['Authorization'] = 'Bearer ' . base64_decode(base64_encode( $bearer_auth ));