def get_token_from_post_data(self, data):
try:<EOL><INDENT>for x in ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>if not data.get(x):<EOL><INDENT>raise TypeError("<STR_LIT>".format(x))<EOL><DEDENT><DEDENT>if '<STR_LIT>' in data:<EOL><INDENT>return self.refresh_token(**data)<EOL><DEDENT>for x in ['<STR_LIT>', '<STR_LIT:code>']:<EOL><INDENT>if not data.get(x):<EOL><INDENT>raise TypeError("<STR_LIT>".format(x))            <EOL><DEDENT><DEDENT>return self.get_token(**data)<EOL><DEDENT>except TypeError as exc:<EOL><INDENT>self._handle_exception(exc)<EOL>return self._make_json_error_response('<STR_LIT>')<EOL><DEDENT>except StandardError as exc:<EOL><INDENT>self._handle_exception(exc)<EOL>return self._make_json_error_response('<STR_LIT>')<EOL><DEDENT>
Get a token response from POST data.

        :param data: POST data containing authorization information.
        :type data: dict
        :rtype: requests.Response