Error authenticating to Twitter

74 views
Skip to first unread message

paulo...@gmail.com

unread,
Oct 30, 2015, 7:36:02 PM10/30/15
to python-twitter
Hello all.

We're migrating from Flask to Django but with Django the application keeps getting the "TwitterError: [{u'message': u'Could not authenticate you.', u'code': 32}]" error.

My credentials are completely fine as it works well in production server with Flask.

twitter_api = twitter.Api(consumer_key=settings.TWITTER_CONSUMER_KEY,
                                      consumer_secret
=settings.TWITTER_CONSUMER_SECRET_KEY,
                                      access_token_key
=access_token,
                                      access_token_secret
=access_token_secret)



What should I do?

Thanks,

Paulo

bear

unread,
Oct 30, 2015, 7:40:34 PM10/30/15
to python-...@googlegroups.com
First I would check with debugHTTP=True set in the call to Api() -
this will print what is being sent to twitter and the full payload
response - there may be an error message that we are not parsing
properly.

Second, what does the call to twitter.VerifyCredentials() report -
that also has good payload error messages.
> --
> You received this message because you are subscribed to the Google Groups
> "python-twitter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python-twitte...@googlegroups.com.
> To post to this group, send email to python-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/python-twitter.
> For more options, visit https://groups.google.com/d/optout.



--
Bear

bea...@gmail.com (email)
be...@bear.im (xmpp, email)
http://bear.im

PGP Fingerprint = 9996 719F 973D B11B E111 D770 9331 E822 40B3 CD29
Reply all
Reply to author
Forward
0 new messages