Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 821341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T02:37:28+00:00 2026-05-15T02:37:28+00:00

I am trying to write a twitter client application in python. I would like

  • 0

I am trying to write a twitter client application in python. I would like to use xAuth for authentication. My choice on the library is tweepy, because it seems that it knows everything I need.

Here is my problem:

>>> import tweepy
>>> auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
>>> auth.get_xauth_access_token('username', 'password')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "tweepy/auth.py", line 152, in get_xauth_access_token
    raise TweepError(e)
tweepy.error.TweepError: HTTP Error 401: Unauthorized

The username and the password is correct, I can log in with them. The CONSUMER_{KEY,SECRET} also valid, I copypasted them from the page of my application.

Do you have any idea why the code above fails?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T02:37:29+00:00Added an answer on May 15, 2026 at 2:37 am

    Have you emailed Twitter support to get them to turn on xAuth for your application?

    Twitter only want xAuth to be used by desktop and mobile applications, so registered applications have xAuth disabled by default, and you need someone at Twitter to turn it on for you. If you application doesn’t have xAuth enabled, you get a 401.

    To get xAuth enabled, send an email to api@twitter.com with the name of your application and the reason it needs xAuth instead of plain old OAuth (eg. it’s not appropriate to pop up a web browser in my desktop application).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am learning Python and PyGTK. I'm trying to write a Twitter client. Which
I'm trying to write an integration that tests the whole Twitter authentication process. Every
I'm trying to implement a Twitter authentication via OAuth on my Django application, but
Hi I'm trying to use Javascript to write a chrome application that will show
I'm trying to write a relatively simple twitter query in php with result like
I would like to write a console application that automatically posts information to my
Trying to write a chat, like on facebook, I wondered if two clients can
Hi I am trying to identify key Twitter influencers for a client and I
I am trying to write twitter app using android. The twitter login page opens
I am trying to write an php twitter script which will be run by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.