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

  • SEARCH
  • Home
  • 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 8461249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:49:41+00:00 2026-06-10T13:49:41+00:00

I just updated to Twython 2.3.4, but now my Twitter auth stops working. It

  • 0

I just updated to Twython 2.3.4, but now my Twitter auth stops working. It fails on the ‘ auth_props = twitter.get_authentication_tokens()’ line. Any idea what went wrong? Thanks in advance!

The python code to do Twitter auth using Twython is below:

def begin_auth(request):
    twitter = Twython(
        twitter_token = TWITTER_KEY,
        twitter_secret = TWITTER_SECRET,
        callback_url = request.build_absolute_uri(reverse('portnoy.views.thanks'))
    )
    # Request an authorization url to send the user to...
    auth_props = twitter.get_authentication_tokens()

I have the following error on the line above: TwythonAuthError: “Seems something couldn’t be verified with your OAuth junk. Error: 401, Message: Failed to validate oauth signature and token”

    # Then send them over there, durh.
    request.session['request_token'] = auth_props
    return HttpResponseRedirect(auth_props['auth_url'])

def thanks(request, redirect_url='/'):
    c = RequestContext(request)
    # for permanent ones and store them...
    twitter = Twython(
        twitter_token = TWITTER_KEY,
        twitter_secret = TWITTER_SECRET,
        oauth_token = request.session['request_token']['oauth_token'],
        oauth_token_secret = request.session['request_token']['oauth_token_secret']
     )

    # Retrieve the tokens we want...
    authorized_tokens = twitter.get_authorized_tokens()
    request.session['request_tokens'] = authorized_tokens
    debug('thanks', request.session['request_tokens'])

    user = User.objects.filter(username=authorized_tokens['screen_name'])
    if user.exists():
        user = user[0]
        user.backend='django.contrib.auth.backends.ModelBackend'     
        auth.login(request,user)
    else:
        return render_to_response('twitter_register.html', c)   
    return HttpResponseRedirect(redirect_url)
  • 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-06-10T13:49:42+00:00Added an answer on June 10, 2026 at 1:49 pm

    I’m the author of Twython.

    What version of Requests are you running under the hood? There was recently an issue where people kept running into various OAuth-related errors due to an upstream bug. Curious if it’s related to that…

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

Sidebar

Related Questions

I just updated to rails 3.2 and twitter gem 2.0.2 Now when I start
Just updated the version of Ruby (1.9.2 to 1.9.3) I have installed but now
Just updated from xcode 4.1 to 4.3 because I needed some functions. But now
We just updated to Mac OSX 10.5.7 and now anytime I bring up any
I just updated my Macbook to Mountain Lion, but now I'm not able to
I just updated PHP 5.2.0 to 5.2.11 and now I am getting loads of
I just updated my django to 1.4. But I am getting the following error
I just updated my ruby version and now when I run irb in command
I just updated to jQuery 1.4.2 & jQueryUI 1.8.2 w/the google cdn and now
I have just updated my iPad with iOS 5 and now when I am

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.