From: Harmon Date: Fri, 7 Jan 2022 13:07:46 +0000 (-0600) Subject: Remove OAuthHandler.get_xauth_access_token X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8e2de9f590031bf6d6ade8946e7371366c4caa58;p=tweepy.git Remove OAuthHandler.get_xauth_access_token https://twittercommunity.com/t/retirement-of-xauth/88022 --- diff --git a/tweepy/auth.py b/tweepy/auth.py index 722e375..ff83ef6 100644 --- a/tweepy/auth.py +++ b/tweepy/auth.py @@ -100,28 +100,6 @@ class OAuthHandler: except Exception as e: raise TweepyException(e) - def get_xauth_access_token(self, username, password): - """ - Get an access token from an username and password combination. - In order to get this working you need to create an app at - http://twitter.com/apps, after that send a mail to api@twitter.com - and request activation of xAuth for it. - """ - try: - url = self._get_oauth_url('access_token') - oauth = OAuth1(self.consumer_key, - client_secret=self.consumer_secret) - r = requests.post(url=url, - auth=oauth, - headers={'x_auth_mode': 'client_auth', - 'x_auth_username': username, - 'x_auth_password': password}) - - credentials = parse_qs(r.content) - return credentials.get('oauth_token')[0], credentials.get('oauth_token_secret')[0] - except Exception as e: - raise TweepyException(e) - class OAuth2AppHandler: