I receive a HTTP 401 Unauthorized code. I've made sure the twitter
user gives the app read/write permissions. I've also made sure the
user isn't being rate limited. Here's the POST request with PII
removed.

send: 'GET /1/account/verify_credentials.json?
oauth_nonce=95746995&oauth_timestamp=1303607746&oauth_consumer_key=y...g&oauth_signature_method=HMAC-
SHA1&oauth_version=1.0&oauth_token=13...F&oauth_signature=9ZI
%2F3KMGcm0WctVJqKaFtpY9Rhk%3D HTTP/1.1\r\nAccept-Encoding: identity\r
\nHost: api.twitter.com\r\nConnection: close\r\nUser-Agent: Python-
urllib/2.6\r\n\r\n'
reply: 'HTTP/1.1 401 Unauthorized\r\n'
header: Date: Sun, 24 Apr 2011 01:15:47 GMT
header: Server: hi
header: Status: 401 Unauthorized
header: WWW-Authenticate: OAuth realm="https://api.twitter.com";
header: Content-Type: application/json; charset=utf-8
header: Content-Length: 334
header: Cache-Control: no-cache, max-age=300
header: Set-Cookie: k=...1303607747379282; path=/; expires=Sun, 01-
May-11 01:15:47 GMT; domain=.twitter.com
header: Set-Cookie: guest_id=130360774738393619; path=/; expires=Tue,
24 May 2011 01:15:47 GMT
header: Set-Cookie:
_twitter_sess=BAh7CDoPY3JlYXRlZF9hdGwrCECjE4UvAToHaWQiJWIxMWVhMDVhMjc2ZTU3%250AMTg1Yjk0MTY1MGNiNTcxNGVhIgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVy
%250AOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--7b0033ed6930cb989d232c8d907947704cbe8cb6;
domain=.twitter.com; path=/; HttpOnly
header: Expires: Sun, 24 Apr 2011 01:20:47 GMT
header: Vary: Accept-Encoding
header: Connection: close


On Apr 23, 6:27 pm, bear <bea...@gmail.com> wrote:
> I just ran the following test using my current source tree for
> python-twitter and got no errors.  You may want to use debugHTTP=True to
> look at what the POST being sent to Twitter is.
>
> import twitter
> api = twitter.Api(consumer_key='####', consumer_secret='####',
>                           access_token_key='####',
> access_token_secret='####',
>                           debugHTTP=True)
> print api.VerifyCredentials()

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk

Reply via email to