def request(self):
        """ Returns an OAuth2 Session to be used to make requests.
        Returns None if a token hasn't yet been received."""

        headers = {'Accept': 'application/json'}

        # Use API Key if possible
        if self.api_key:
            headers['X-API-KEY'] = self.api_key
            return requests,headers
        else:
            # Try to use OAuth
            if self.token:
                return OAuth2Session(self.client_id, token=self.token),headers
            else:
                raise APIError("No API key and no OAuth session available")
Returns an OAuth2 Session to be used to make requests.
        Returns None if a token hasn't yet been received.