def __prepare_token_request(self, params, url=None):
        """Generate the request parameters to execute the POST call to
        get or refresh a token.

        Parameters
        ----------
        params : dictionary
            Contains the parameters that will be given as data to the oauth
            endpoint

        Returns
        -------
        type
            The filled request parameters with all required informations

        """
        if self.secret_key is None:
            params['code_verifier'] = self.code_verifier
            params['client_id'] = self.client_id

        request_params = {
            'headers': self.__get_basic_auth_header(),
            'data': params,
            'url': self.oauth_token if url is None else url,
        }

        return request_params