[twitter-dev] Re: 401 unauthorized

2011-03-21 Thread akiyoshi
Ok, here's what I've got so far in my development machine:

All requests to: https://api.twitter.com/oauth/
I'm using Twitterizer OAuth library.
All testing was done trying to authenticate the same user.

Request Token -> Access Token response headers:

Local Machine Time: 21/03/2011 - 11:24 a.m (-3 São Paulo, Brazil)

{Status: 401 Unauthorized
X-Transaction: 1300717410-27747-18545
X-Runtime: 0.00612
Pragma: no-cache
X-Revision: DEV
Content-Length: 1
Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-
check=0
Content-Type: text/html; charset=utf-8
Date: Mon, 21 Mar 2011 14:23:30 GMT
Expires: Tue, 31 Mar 1981 05:00:00 GMT
Last-Modified: Mon, 21 Mar 2011 14:23:30 GMT
Set-Cookie: k=186.204.24.164.1300717410112809; path=/; expires=Mon, 28-
Mar-11 14:23:30 GMT; domain=.twitter.com,guest_id=130071741011897398;
path=/; expires=Wed, 20 Apr 2011 14:23:30
GMT,_twitter_sess=BAh7CDoPY3JlYXRlZF9hdGwrCEeXzNguAToHaWQiJWY0YWJkOTg5MzA5N2Jk
%250ANmU2MjRlN2Q4OTY4ZDVlOGE3IgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVy
%250AOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--5f19c3e4b79f1e24195a532adf988bc5764dc878;
domain=.twitter.com; path=/; HttpOnly
Server: hi
Vary: Accept-Encoding

}

Local Machine Time: 21/03/2011 - 11:26 a.m (-3 São Paulo, Brazil)

{Status: 401 Unauthorized
X-Transaction: 1300717553-71682-48532
X-Runtime: 0.00788
Pragma: no-cache
X-Revision: DEV
Content-Length: 1
Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-
check=0
Content-Type: text/html; charset=utf-8
Date: Mon, 21 Mar 2011 14:25:54 GMT
Expires: Tue, 31 Mar 1981 05:00:00 GMT
Last-Modified: Mon, 21 Mar 2011 14:25:53 GMT
Set-Cookie: k=186.204.24.164.1300717553990342; path=/; expires=Mon, 28-
Mar-11 14:25:53 GMT; domain=.twitter.com,guest_id=130071755399831650;
path=/; expires=Wed, 20 Apr 2011 14:25:53
GMT,_twitter_sess=BAh7CDoPY3JlYXRlZF9hdGwrCE
%252FJztguAToHaWQiJWMwNjU4N2ZjMzU1Zjkw
%250AOTYxNzZiODcyNjRhNjU1YTIxIgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVy
%250AOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--475d60acc3baee4151254364e9ffddb0ed8a4e76;
domain=.twitter.com; path=/; HttpOnly
Server: hi
Vary: Accept-Encoding
}

Successful response:

Achieved by waiting some seconds between requesting and reading the
response when getting the RequestToken.

Local Machine Time: 21/03/2011 - 11:49 a.m (-3 São Paulo, Brazil)

{Status: 200 OK
X-Transaction: 1300718905-61910-2260
X-Runtime: 0.02514
Pragma: no-cache
X-Revision: DEV
Content-Length: 170
Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-
check=0
Content-Type: text/html; charset=utf-8
Date: Mon, 21 Mar 2011 14:48:25 GMT
Expires: Tue, 31 Mar 1981 05:00:00 GMT
ETag: "82276158764a17db3bb7fd96d46eb377"
Last-Modified: Mon, 21 Mar 2011 14:48:25 GMT
Set-Cookie: k=186.204.24.164.1300718905898781; path=/; expires=Mon, 28-
Mar-11 14:48:25 GMT; domain=.twitter.com,guest_id=130071890590494715;
path=/; expires=Wed, 20 Apr 2011 14:48:25
GMT,_twitter_sess=BAh7CDoPY3JlYXRlZF9hdGwrCDBq49guAToHaWQiJWRiMzgxYWFhOTFmMjVl
%250AODI3NDI5NmFjZjI0ZmMyYzgyIgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVy
%250AOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--
c2deb47c8c0545588cb18f77aa3516546f350e26; domain=.twitter.com; path=/;
HttpOnly
Server: hi
Vary: Accept-Encoding

}


On Mar 21, 11:30 am, Tatham Oddie  wrote:
> Hi Taylor,
>
> I’m using the TweetSharp library.
>
> Here are my requests…
>
> Getting the request token works:
>
> UTC now: 21/03/2011 2:15:44 PM
>
> https://api.twitter.com/oauth/request_token
>
> GET /oauth/request_token HTTP/1.1
> Authorization: OAuth 
> oauth_callback="...",oauth_consumer_key="...",oauth_nonce="...",oauth_signa 
> ture="...",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1300716944", 
> oauth_version="1.0"
> User-Agent: TweetSharp
> Host: api.twitter.com
> Connection: Keep-Alive
>
> 200 OK
> X-Transaction: 1300716948-77667-49892
> X-Runtime: 0.00938
> Pragma: no-cache
> X-Revision: DEV
> Content-Length: 144
> Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0
> Content-Type: text/html; charset=utf-8
> Date: Mon, 21 Mar 2011 14:15:48 GMT
> Expires: Tue, 31 Mar 1981 05:00:00 GMT
> ETag: "00fdd191cfa579128843a85a7a58be9f"
> Last-Modified: Mon, 21 Mar 2011 14:15:48 GMT
> Set-Cookie: k=124.169.147.184; path=/; expires=Mon, 28-Mar-11 14:15:48 
> GMT; domain=.twitter.com,guest_id=...; path=/; expires=Wed, 20 Apr 2011 
> 14:15:48 GMT,admobuu=...; domain=.m.twitter.com; path=/; expires=Tue, 19 Jan 
> 2038 03:14:07 GMT,_twitter_sess=...; domain=.twitter.com; path=/; HttpOnly
> Server: hi
> Vary: Accept-Encoding
> Keep-Alive: timeout=15, max=100
> Connection: Keep-Alive
>
> oauth_token=...&oauth_token_secret=...&oauth_callback_confirmed=true
>
> Getting the access token straight away fails with 401:
>
> UTC now: 21/03/2011 2:15:46 PM
>
> https://api.twitter.com/oauth/access_token
>
> POST /oauth/access_token HTTP/1.1
> Authorization: OAuth 
> oauth_consumer_key="...",oauth_nonce="...",oauth_signature="...",oauth_sign 
> ature_me

[twitter-dev] Re: 401 unauthorized

2011-03-20 Thread akiyoshi
Well it stopped working for me as well. My scenario was the same as
Joe Mayo's till yesterday.

On 20 mar, 13:21, Ninjamonk  wrote:
> well it's stopped working completely now even if I pause.
>
> Can someone from twitter let us know the progress of this bug?
>
> On Mar 20, 3:28 pm, Joe Mayo  wrote:
>
>
>
> > I'm seeing the same problem with 401's during authentication.  I have
> > an app that has worked flawlessly (with no code changes) for months
> > that is now receiving 401's.  I'm also have multiple support issues on
> > users experiencing intermittent 401 errors.  For some apps, every
> > authentication request results in a 401, but it seems to happen every
> > other authentication for others.
>
> > Joe
>
> > On Mar 20, 9:10 am, Ninjamonk  wrote:
>
> > > I am still getting this issue and I think it's time related at
> > > twitters end.
>
> > > steps:
>
> > > 1. go to twitter and let user auth app
> > > 2. on return use verifier and token to ask twitter for the tokens and
> > > get a 401
>
> > > Now if I pause step 2 before asking twitter for the tokens for 10
> > > seconds it works fine.
>
> > > This code has worked for over 6 months and now I am getting this issue
> > > all of a sudden.
>
> > > I would look at my code but there are a lot of people getting the same
> > > issue.
>
> > > Cheers
>
> > > Darren
>
> > > On Mar 19, 6:05 pm, Matt Harris  wrote:
>
> > > > Hi Trevor,
>
> > > > Could you share the request and response you are sending so we can
> > > > investigate. Remember to obscure user and consumer secrets.
>
> > > > Thanks,
> > > > @themattharris
> > > > Developer Advocate, Twitterhttp://twitter.com/themattharris
>
> > > > On Sat, Mar 19, 2011 at 5:47 AM, Trevor Dean  
> > > > wrote:
>
> > > > > Is anyone else experiencing any 401 errors all of a sudden?  I was 
> > > > > doing
> > > > > some testing this morning and was logging in fine using twitter and 
> > > > > then 10
> > > > > min later I started getting 401 unauthorized errors.
>
> > > > > Thanks,
>
> > > > > Trevor
>
> > > > > --
> > > > > 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-Hidequoted 
> > > > >text -
>
> > > - Show quoted text -- Ocultar texto das mensagens anteriores -
>
> - Mostrar texto das mensagens anteriores -

-- 
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