private function createBearerCredentials()
    {
        //URL encode the consumer key and consumer secret
        $consumerKey = rawurlencode($this->credentials->getConsumerKey());
        $consumerSecret = rawurlencode($this->credentials->getConsumerSecret());

        //create bearer token credentials by concatenating the consumer key and consumer secret, seperated by a colon.
        $bearerTokenCredentials = $consumerKey . ':' . $consumerSecret;

        //base64 encode the bearer token credentials
        return base64_encode($bearerTokenCredentials);
    }