def get_token(self,<EOL>grant_type,<EOL>client_id,<EOL>client_secret,<EOL>redirect_uri,<EOL>code,<EOL>**params):
<EOL>if grant_type != '<STR_LIT>':<EOL><INDENT>return self._make_json_error_response('<STR_LIT>')<EOL><DEDENT>is_valid_client_id = self.validate_client_id(client_id)<EOL>is_valid_client_secret = self.validate_client_secret(client_id,<EOL>client_secret)<EOL>is_valid_redirect_uri = self.validate_redirect_uri(client_id,<EOL>redirect_uri)<EOL>scope = params.get('<STR_LIT>', '<STR_LIT>')<EOL>is_valid_scope = self.validate_scope(client_id, scope)<EOL>data = self.from_authorization_code(client_id, code, scope)<EOL>is_valid_grant = data is not None<EOL>if not (is_valid_client_id and is_valid_client_secret):<EOL><INDENT>return self._make_json_error_response('<STR_LIT>')<EOL><DEDENT>if not is_valid_grant or not is_valid_redirect_uri:<EOL><INDENT>return self._make_json_error_response('<STR_LIT>')<EOL><DEDENT>if not is_valid_scope:<EOL><INDENT>return self._make_json_error_response('<STR_LIT>')<EOL><DEDENT>self.discard_authorization_code(client_id, code)<EOL>access_token = self.generate_access_token()<EOL>token_type = self.token_type<EOL>expires_in = self.token_expires_in<EOL>refresh_token = self.generate_refresh_token()<EOL>self.persist_token_information(client_id=client_id,<EOL>scope=scope,<EOL>access_token=access_token,<EOL>token_type=token_type,<EOL>expires_in=expires_in,<EOL>refresh_token=refresh_token,<EOL>data=data)<EOL>return self._make_json_response({<EOL>'<STR_LIT>': access_token,<EOL>'<STR_LIT>': token_type,<EOL>'<STR_LIT>': expires_in,<EOL>'<STR_LIT>': refresh_token<EOL>})<EOL>
Generate access token HTTP response.

        :param grant_type: Desired grant type. Must be "authorization_code".
        :type grant_type: str
        :param client_id: Client ID.
        :type client_id: str
        :param client_secret: Client secret.
        :type client_secret: str
        :param redirect_uri: Client redirect URI.
        :type redirect_uri: str
        :param code: Authorization code.
        :type code: str
        :rtype: requests.Response