Re: [twitter-dev] Re: 401 Unauthorized Responses to requests signed with whitelisted account
Hi Chris, Our policy team are the beat ones to contact about this as they have access to the information about why the app was suspended. You can contact them through a...@twitter.com . When you contact them let then know what you've put in the email below and include the ticket number of your previous communication with them. They will be able to let you know the next steps. Best @themattharris On Apr 19, 2011, at 8:57, Christopher Stolte stolte...@gmail.com wrote: Hi Matt, Thank you so much for your timely response. Your suggestion was very helpful - I logged the response body and am seeing the following error: Invalid / suspended application I really don't know why that would be - does that mean that we are blacklisted? I should point out a few things that you will probably want to know: 1. We have a conservative and fairly sophisticated throttling system to prevent us from over-stepping the rate limit (I don't think that's the problem...) 2. On Saturday I received a message from the API support team confirming that our whitelisted account was in good standing (can provide the message if it's helpful) 3. We've seen the rate limit reported in the response change back and forth somewhat sporadically... Thank you again for any help you can provide - in general we are very pleased with the API and we certainly appreciate your support! Best, Chris On Apr 18, 3:44 pm, Matt Harris thematthar...@twitter.com wrote: Hi Christopher, Could you attempt to get the response body for the request either by repeating the request or enhancing your logs. The reason for the 401 is communicated in the response body and knowing that will help explain what is going on. Best, @themattharris Developer Advocate, Twitterhttp://twitter.com/themattharris On Mon, Apr 18, 2011 at 11:23 AM, Christopher Stolte stolte...@gmail.comwrote: Hello, I am a Java developer working on a web application that makes use of the Twitter API. We use the Signpost library (version 1.2.1.1) to perform OAuth and issue API requests, and have been doing so successfully for months. We have been signing our requests with a whitelisted key and secret that has a 20,000 request/hour rate limit. In the last few days, we started getting only 401 Not Authorized responses when using these credentials. Upon looking back at our server logs, I notice other requests failures dating back to at least Feb 17, but they are sporadic. Error messages look like this: WARN org.apache.http.impl.client.DefaultHttpClient Authentication error: Unable to respond to any of these challenges: {oauth=WWW- Authenticate: OAuth realm=http://api.twitter.com} The response header shows 401 but no other enlightening information. I have paid attention to and read lots of other postings related to OAuth, and want to emphasize that our system has been working for quite a while - we make calls using the proper end points and so forth: http://api.twitter.com/1/users/show.json?user_id=[id] Something appears to have changed on Twitter's end but we don't know what. Can anyone shed some light on what might be happening? We have already verified with Twitter API support that our credentials should still be viable - perhaps there has been an inadvertent shutdown of that account? Thank you in advance for any help or guidance! Sincerely, Chris Stolte -- 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 -- 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 -- 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
Re: [twitter-dev] Re: 401 unauthorized
I know Twitter is still working on finding a fix but it's been a couple of weeks now and it might be a good idea to implement the https to http hack for now until they resolve the issue. I was hoping there would be a fix by now but I can't wait any longer so I will be making that change. On Mon, Mar 28, 2011 at 11:30 AM, r9handa riha...@gmail.com wrote: Are you guys still experimenting the issue? My application is still very unstable, got the Unauthorized all the time. Anyone knows if we have to change our application, or Twitter will fix the problem? Thanks. On 24 mar, 10:44, Ninjamonk dar...@stuartmedia.co.uk wrote: Thanks for the link to the issue, now I can watch it. I have reverted to the http work around which I hate due to the lack of security. On Mar 24, 1:11 pm, Trevor Dean trevord...@gmail.com wrote: Yes I was also hoping or a more recent update, the last one was over 18 hours ago and didn't provide much detail ( http://code.google.com/p/twitter-api/issues/detail?id=2118). On Thu, Mar 24, 2011 at 7:56 AM, Ninjamonk dar...@stuartmedia.co.uk wrote: any news on this? bit of a joke that it's been going on for a week now and we have no eta on a fix. I have 2 apps waiting to release but as they feature sign in with twitter I cannot do it. One is for the new F1 season which kicks off this weekend... On Mar 24, 2:46 am, Craig Walls hab...@gmail.com wrote: No, I'm using the Java-based Spring Social for this. And I've seen other threads describing the same problem with PHP. Definitely not just a .NET problem. On 3/23/11 6:35 PM, Milos Golubovic wrote: I can also confirm this behavior. Is it me or is everyone in here using .NET? Did I possibly miss somewhere that this is a .NET forum? I am also using a .NET library (Twitterizer). Wondering if anyone not using .NET is experiencing this issue? On Mar 23, 8:21 am, Craig Wallshab...@gmail.com wrote: I've just confirmed what Gary M says...switching to HTTP does seem to make it work. But HTTPS requires a15 second delay between obtaining a request token and exchanging it for an access token. On Mar 23, 1:48 am, Gary Mgen...@gmail.com wrote: Correction. Switching to HTTP does remove the issue, so I'm making that a configurable setting in our app as a temporary workaround. -- 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 -- 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 -- 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
Re: [twitter-dev] Re: 401 unauthorized
On Mon, Mar 28, 2011 at 10:40 AM, Trevor Dean trevord...@gmail.com wrote: I know Twitter is still working on finding a fix but it's been a couple of weeks now and it might be a good idea to implement the https to http hack for now until they resolve the issue. I was hoping there would be a fix by now but I can't wait any longer so I will be making that change. Sorry, what hack is that? I've heard a bunch of advice on working around this, but nothing conclusive. -- 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
Re: [twitter-dev] Re: 401 unauthorized
Yes I was also hoping or a more recent update, the last one was over 18 hours ago and didn't provide much detail ( http://code.google.com/p/twitter-api/issues/detail?id=2118). On Thu, Mar 24, 2011 at 7:56 AM, Ninjamonk dar...@stuartmedia.co.uk wrote: any news on this? bit of a joke that it's been going on for a week now and we have no eta on a fix. I have 2 apps waiting to release but as they feature sign in with twitter I cannot do it. One is for the new F1 season which kicks off this weekend... On Mar 24, 2:46 am, Craig Walls hab...@gmail.com wrote: No, I'm using the Java-based Spring Social for this. And I've seen other threads describing the same problem with PHP. Definitely not just a .NET problem. On 3/23/11 6:35 PM, Milos Golubovic wrote: I can also confirm this behavior. Is it me or is everyone in here using .NET? Did I possibly miss somewhere that this is a .NET forum? I am also using a .NET library (Twitterizer). Wondering if anyone not using .NET is experiencing this issue? On Mar 23, 8:21 am, Craig Wallshab...@gmail.com wrote: I've just confirmed what Gary M says...switching to HTTP does seem to make it work. But HTTPS requires a15 second delay between obtaining a request token and exchanging it for an access token. On Mar 23, 1:48 am, Gary Mgen...@gmail.com wrote: Correction. Switching to HTTP does remove the issue, so I'm making that a configurable setting in our app as a temporary workaround. -- 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 -- 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
Re: [twitter-dev] Re: 401 unauthorized
No, I'm using the Java-based Spring Social for this. And I've seen other threads describing the same problem with PHP. Definitely not just a .NET problem. On 3/23/11 6:35 PM, Milos Golubovic wrote: I can also confirm this behavior. Is it me or is everyone in here using .NET? Did I possibly miss somewhere that this is a .NET forum? I am also using a .NET library (Twitterizer). Wondering if anyone not using .NET is experiencing this issue? On Mar 23, 8:21 am, Craig Wallshab...@gmail.com wrote: I've just confirmed what Gary M says...switching to HTTP does seem to make it work. But HTTPS requires a15 second delay between obtaining a request token and exchanging it for an access token. On Mar 23, 1:48 am, Gary Mgen...@gmail.com wrote: Correction. Switching to HTTP does remove the issue, so I'm making that a configurable setting in our app as a temporary workaround. -- 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
Re: [twitter-dev] Re: 401 unauthorized
Yup, totally stopped working for me as well and my scenario is the same as Joe's too. Any status updates on this issue? On Sun, Mar 20, 2011 at 2:09 PM, akiyoshi rafael.fuk...@gmail.com wrote: 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 dar...@stuartmedia.co.uk 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 mayos...@gmail.com 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 dar...@stuartmedia.co.uk 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 thematthar...@twitter.com 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 trevord...@gmail.com 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 -- 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
Re: [twitter-dev] Re: 401 unauthorized
Thanks everyone for the detailed information in these reports; they'll help a lot while we track down the issue. Will update this thread when we know more. @episod http://twitter.com/episod - Taylor Singletary - Twitter Developer Advocate On Mon, Mar 21, 2011 at 6:03 AM, Tatham Oddie tat...@oddie.com.au wrote: Please go and star this issue: http://code.google.com/p/twitter-api/issues/detail?id=2118 On Mar 19, 11:47 pm, Trevor Dean trevord...@gmail.com 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 -- 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
Re: [twitter-dev] Re: 401 unauthorized
If you're experiencing this issue, can you please provide these additional details: * are the OAuth URLs you are using http or https? * do your OAuth URLs contain the api subdomain? (you really should be if you aren't) * what OAuth library (if any) are you using to sign your requests? * If you're observing the response HTTP headers on failed requests, what server time is presented in the Date HTTP header? What is your OAuth timestamp? Thanks! @episod http://twitter.com/episod - Taylor Singletary - Twitter Developer Advocate On Mon, Mar 21, 2011 at 6:24 AM, Taylor Singletary taylorsinglet...@twitter.com wrote: Thanks everyone for the detailed information in these reports; they'll help a lot while we track down the issue. Will update this thread when we know more. @episod http://twitter.com/episod - Taylor Singletary - Twitter Developer Advocate On Mon, Mar 21, 2011 at 6:03 AM, Tatham Oddie tat...@oddie.com.au wrote: Please go and star this issue: http://code.google.com/p/twitter-api/issues/detail?id=2118 On Mar 19, 11:47 pm, Trevor Dean trevord...@gmail.com 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 -- 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
RE: [twitter-dev] Re: 401 unauthorized
Hi Taylor, I’m using the TweetSharphttp://tweetsharp.codeplex.com/ 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_signature=...,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_signature_method=HMAC-SHA1,oauth_timestamp=1300716946,oauth_token=...,oauth_verifier=...,oauth_version=1.0 Content-Type: application/x-www-form-urlencoded User-Agent: TweetSharp Host: api.twitter.com Content-Length: 0 401 Unauthorized X-Transaction: 1300716950-90707-10498 X-Runtime: 0.00684 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:15:50 GMT Expires: Tue, 31 Mar 1981 05:00:00 GMT Last-Modified: Mon, 21 Mar 2011 14:15:50 GMT Set-Cookie: k=124.169.147.184; path=/; expires=Mon, 28-Mar-11 14:15:50 GMT; domain=.twitter.com,guest_id=...; path=/; expires=Wed, 20 Apr 2011 14:15:50 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 Trying the same request again 10 minutes later works (only oauth_timestamp changed): UTC now: 21/03/2011 2:25:42 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_signature_method=HMAC-SHA1,oauth_timestamp=1300717542,oauth_token=...,oauth_verifier=...,oauth_version=1.0 Content-Type: application/x-www-form-urlencoded User-Agent: TweetSharp Host: api.twitter.com Content-Length: 0 Connection: Keep-Alive 200 OK X-Transaction: 1300717546-72934-39621 X-Runtime: 0.03056 Pragma: no-cache X-Revision: DEV Content-Length: 163 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:46 GMT Expires: Tue, 31 Mar 1981 05:00:00 GMT ETag: 9ac6161371b0ee90ef8f6db5322287df Last-Modified: Mon, 21 Mar 2011 14:25:46 GMT Set-Cookie: k=124.169.147.184.1300717546945450; path=/; expires=Mon, 28-Mar-11 14:25:46 GMT; domain=.twitter.com,guest_id=130071754695116305; path=/; expires=Wed, 20 Apr 2011 14:25:46 GMT,admobuu=989196f7fa5728c90e815cc8f97cd56a; domain=.m.twitter.com; path=/; expires=Tue, 19 Jan 2038 03:14:07 GMT,_twitter_sess=BAh7CDoPY3JlYXRlZF9hdGwrCMitztguAToHaWQiJTk4NDllMmVhZTM1OTJk%250ANzQ0MGFlMWM2YzQ1ZTU2MDg4IgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVy%250AOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--dad7912a647454357cfa6f0d07804b5c4b5d6ae4; domain=.twitter.com; path=/; HttpOnly Server: hi Vary: Accept-Encoding Keep-Alive: timeout=15, max=100 Connection: Keep-Alive oauth_token=...oauth_token_secret=...user_id=14051560screen_name=tathamoddie I’m noting that the time offset here is only about 4 seconds, however it certainly takes longer than that to work. You can see this for yourself trying to sign in to http://ivebeen.to -- Tatham Oddie au mob: +61 414 275 989, us cell: +1 213 280 3556, skype: tathamoddie If you’re printing this email, you’re doing it wrong. This is a computer, not a typewriter. From: Taylor Singletary [mailto:taylorsinglet...@twitter.com] Sent: Tuesday, 22 March 2011 1:05 AM To: twitter-development-talk@googlegroups.com Cc: Tatham Oddie Subject: Re: [twitter-dev] Re: 401 unauthorized If you're experiencing this issue, can you please provide these additional details: * are the OAuth URLs you are using http or https? * do your OAuth URLs contain the api subdomain? (you really should be if you aren't) * what OAuth library
Re: [twitter-dev] Re: 401: Unauthorized (Python)
Hi John, That dict object doesn't contain the response body. In the response body we give an error reason such as 'Invalid signature', or 'timestamp out of bounds'. Best, Matt On Feb 4, 2011, at 17:37, john john.g...@gmail.com wrote: Hi Matt, Thanks for responding. I've posted the response below (as a python dict). {'status': '401', 'content-length': '1', 'x-xss-protection': '1; mode=block', 'x-transaction': 'Sat Feb 05 01:33:54 + 2011-76395-3097', 'set-cookie': 'k=74.128.37.77.1296869634703204; path=/; expires=Sat, 12-Feb-11 01:33:54 GMT; domain=.twitter.com, guest_id=129686963484327539; path=/; expires=Mon, 07 Mar 2011 01:33:54 GMT, _twitter_sess=BAh7CDoPY3JlYXRlZF9hdGwrCBwzdPMtAToHaWQiJWY1OTdhNDQ2Yjg1YzIw %250AYTVjMmEyNWUyMjM2ZTY1ZGY3IgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVy %250AOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--01f06bea7e9f7559080f47e3b046117c40c39212; domain=.twitter.com; path=/', 'expires': 'Tue, 31 Mar 1981 05:00:00 GMT', 'vary': 'Accept-Encoding', 'x-runtime': '0.00533', 'server': 'hi', 'x-revision': 'DEV', 'last-modified': 'Sat, 05 Feb 2011 01:33:54 GMT', 'connection': 'close', 'pragma': 'no-cache', 'cache-control': 'no-cache, no-store, must-revalidate, pre-check=0, post-check=0', 'date': 'Sat, 05 Feb 2011 01:33:54 GMT', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'text/html; charset=utf-8'} From what I've read, Twitter's oauth responses lack the error handling that one would like. Any idea where I should go from here? I found the section of the library I'm using that creates the UTC timestamp, by calling time.time(). I would think that Django's timezone property would set the runtime timezone, however I have not checked that specifically. Any ideas? Thanks, John On Feb 4, 4:58 pm, Matt Harris mhar...@twitter.com wrote: Hi John, What is the does the body of the error response say? The message will tell you which part of the oauth request failed. Also be aware that oauth timestamps are in UTC seconds. Best, @themattharris On Feb 4, 2011, at 12:45, john john.g...@gmail.com wrote: I have an application that contains a simple setup using the oauthtwitter library found here. http://code.google.com/p/oauth-python-twitter/ #Example code twitter = app.extras.oauthtwitter.OAuthApi(CONSUMER_KEY, CONSUMER_SECRET) request_token = twitter.getRequestToken() oauth_verifier = request.GET.get('oauth_verifier') access_token = twitter.getAccessToken(request_token, oauth_verifier) I'm failing at getting the access token. I have a verifier and am passing that along, like the example in the oauth lib, however am continuing to get (all day now) 401s. My system time is set correctly, as this is in a Django project, and I'm setting it via TIME_ZONE = 'America/Kentucky/Louisville' in my settings.py. Can anyone help? Thanks, John -- 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 -- 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 -- 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
Re: [twitter-dev] Re: 401 Unauthorized
Everything looks fine with your POST conversation. Can you email directly with more details? 1) What library/tool are you using to make your POSTs? 2) What are the OS/architectures you're running on in your different environments? 3) Are there odd characters in the password? (could this be a character encoding issue?) These are shots in the dark. We're not seeing this with other users/environments that I know of. ---Mark http://twitter.com/mccv On Mon, Mar 22, 2010 at 7:29 AM, Uladzimir Pashkevich v.pashkev...@gmail.com wrote: Hi Mark, Thanks for your reply! Screen name of the account is dmlreach. Please see the request and 2 responses. Request: GET /1/account/verify_credentials.xml HTTP/1.1 Authorization: Basic MY_AUTH_STRING_HERE Host: api.twitter.com OK response headers: Status: 200 OK X-Transaction: 1269267625-43203-17004 X-RateLimit-Limit: 2 X-RateLimit-Remaining: 19998 X-Runtime: 0.06217 Pragma: no-cache X-RateLimit-Class: api_whitelisted X-Revision: DEV X-RateLimit-Reset: 1269271222 Content-Length: 2730 Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post- check=0 Content-Type: application/xml; charset=utf-8 Date: Mon, 22 Mar 2010 14:20:25 GMT Expires: Tue, 31 Mar 1981 05:00:00 GMT ETag: 1f0dfa0c9c82fe48bec465b9bad3793a Last-Modified: Mon, 22 Mar 2010 14:20:25 GMT Set-Cookie: guest_id=1269267625681; path=/,lang=en; path=/,_twitter_sess=BAh7CToRdHJhbnNfcHJvbXB0MDoPY3JlYXRlZF9hdGwrCOn2PoYnAToHaWQi %250AJWIyNDJhNjNkZjI1MzVkZDBmMWE5ODExZWMxOGE1ZjRkIgpmbGFzaElDOidB %250AY3Rpb25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA-- bbde5312124b201f3cead86cb3d7e2947579ab88; domain=.twitter.com; path=/ Server: hi Vary: Accept-Encoding Connection: close 401 response headers: Status: 401 Unauthorized X-Runtime: 0.00763 Content-Length: 155 Cache-Control: no-cache, max-age=1800 Content-Type: application/xml; charset=utf-8 Date: Mon, 22 Mar 2010 14:04:48 GMT Set-Cookie: guest_id=1269266688016; path=/,_twitter_sess=BAh7CDoPY3JlYXRlZF9hdGwrCBeoMIYnAToHaWQiJWE1ZjZhMDdjZDA5OWUy %250AZjM1ZDFmMmY5Mzc1YWFjMTQ4IgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVy %250AOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA-- fcdae0e1bde0a38c30903e86171f6b7a26afa0d0; domain=.twitter.com; path=/ Server: hi WWW-Authenticate: Basic realm=Twitter API Expires: Mon, 22 Mar 2010 14:34:47 GMT Vary: Accept-Encoding Connection: close So, in response to the same request I got two different responses. Both requests were made from the same server. I would be very grateful if someone could help me with this issue. On Mar 17, 7:29 pm, Mark McBride mmcbr...@twitter.com wrote: Without more details it's tough to say. Do you at least have the screen name of the account in question, and details on both the success and failure environments? ---Mark http://twitter.com/mccv On Wed, Mar 17, 2010 at 1:39 AM, Uladzimir Pashkevich v.pashkev...@gmail.com wrote: Does anyone has any ideas? Any help is really appreciated, because I can't understand this kind of the API's behavior. On Mar 12, 6:40 pm, Uladzimir Pashkevich v.pashkev...@gmail.com wrote: Hi everyone, I am developing an application using Twitter API and I have encountered into a strange behavior connected with 401 error. I am using basic auth. When I run my application locally, it works just fine and I never get any 401 errors. However, when I run my application on another environment, I get 401 error in approximately 80% cases. I am completely sure that the credentials are correct. What makes this situation even more weird is that I am working with several accounts, and most of them work fine in both environments. I am experiencing problems only with one account. All accounts I work with are whitelisted, so rate limit should not be an issue here. I have no idea what may cause this behavior. Could you please explain me the possible reasons I am getting 401? Thanks, Uladzimir To unsubscribe from this group, send email to twitter-development-talk+ unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject. To unsubscribe from this group, send email to twitter-development-talk+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
Re: [twitter-dev] Re: 401 unauthorized
Our external monitoring is accessing API calls with OAuth just fine. Are you still running into this issue? If so, can you provide more details? ---Mark http://twitter.com/mccv On Sat, Jan 2, 2010 at 7:53 AM, Greg gregory.av...@gmail.com wrote: I'm having the same issue. I've tried to across other sites and it still doesn't work. On Dec 31 2009, 4:05 am, Vignesh vignesh.isqu...@gmail.com wrote: My website uses twitter for authentication, For the past 24 hours the OAuth sign in is continuously returning 401 , i am not able to figure out what to do? Has some one faced similar problems? My site has been down for 24 hours now because of this. please help me out here.
Re: [twitter-dev] Re: 401 Unauthorized problem
It looks like you're trying to actually include the OAuth Authorization header in your POST body, which isn't the way you want to do it. Instead, you should be using the Authorization HTTP header to transmit this info (see http://oauth.net/core/1.0a#anchor46). To make things extra weird, in one case you do have an Authorization header set, but it's basic auth. ---Mark On Thu, Nov 26, 2009 at 6:47 PM, Wilfred yau wld991...@gmail.com wrote: I have already solve the special char problem because encoding in Flex. but I still find that when I call _method= DELETE in List API, I still get 401 Unauthorized from api.twitter.com. On Nov 25, 11:09 am, Wilfred yau wld991...@gmail.com wrote: I am using OAuth to accessListAPI, but I find that if the request URL contain some char like _, (, then twitter will return 401 Unauthorized. Does anyone know what is the problem?? and this is my request: *Request URL: http://api.twitter.com/1/wilfred_yau/yedsrc/members.xml *Request header: Host:api.twitter.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv: 1.9.2b3) Gecko/20091115 Firefox/3.6b3 GTB6 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/ *;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Connection: keep-alive Cookie: __utma=43838368.448377351.1258538849.1259115844.1259117264.22; __utmz=43838368.1258703218.9.4.utmcsr=google|utmccn=(organic)| utmcmd=organic|utmctr=gmasbaby; __utmv=43838368.lang%3A%20en; __qca=P0-1731751766-1258598366235; __utmb=43838368.8.10.1259117264; _twitter_sess=BAh7DDoTcGFzc3dvcmRfdG9rZW4iLWYxZDlkMzA5OWExZTMxMDIzZTlmMGJj %250AOWM1YzllYzAyYTVjOWU2NGM6DGNzcmZfaWQiJTU4MTVlMjgzNWUyNGNhYThh %250ANjE1YzdjOWU4MTE5MGJjOhF0cmFuc19wcm9tcHQwOgl1c2VyaQQ5oOgDOg5y %250AZXR1cm5fdG8iJGh0dHA6Ly90d2l0dGVyLmNvbS9zb2Z0cGVkaWFtYWM6B2lk %250AIiU0Y2JmMWJmNjc0YzJmOTlhZGZjMTA1MzE3NzI3ZGUwNiIKZmxhc2hJQzon %250AQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7%250AAA %253D%253D--3573176707558a7f9cd9653e6a60c073c94e91f5; __utmc=43838368 *Post Data: Content-type: application/x-www-form-urlencoded Content-length: 300 oauth%5Fconsumer%5Fkey=WiW3RrjmAhPvWvTn6oPLAid=66626470oauth %5Ftoken=65577017%2DK65DjHAcUbYOEJW5XMVnVuAkRy8fDnNnVGRZDOSAQoauth %5Ftimestamp=1259118273oauth%5Fsignature=zaA0CbWpls3lowiWG0yHCZig%2B2M %3Doauth%5Fversion=1%2E0oauth%5Fsignature%5Fmethod=HMAC%2DSHA1 %5Fmethod=DELETEoauth%5Fnonce=2875 Also, I got same problem in set status using OAuth : *Request URL: http://twitter.com/statuses/update.xml *Request header: Host: twitter.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv: 1.9.2b3) Gecko/20091115 Firefox/3.6b3 GTB6 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/ *;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Connection: keep-alive Cookie: __utma=43838368.448377351.1258538849.1259115844.1259117264.22; __utmz=43838368.1258703218.9.4.utmcsr=google|utmccn=(organic)| utmcmd=organic|utmctr=gmasbaby; __utmv=43838368.lang%3A%20en; __qca=P0-1731751766-1258598366235; __utmb=43838368.8.10.1259117264; _twitter_sess=BAh7DDoTcGFzc3dvcmRfdG9rZW4iLWYxZDlkMzA5OWExZTMxMDIzZTlmMGJj %250AOWM1YzllYzAyYTVjOWU2NGM6DGNzcmZfaWQiJTU4MTVlMjgzNWUyNGNhYThh %250ANjE1YzdjOWU4MTE5MGJjOgl1c2VyaQQ5oOgDOhF0cmFuc19wcm9tcHQwIgpm %250AbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAG %250AOgpAdXNlZHsAOgdpZCIlNGNiZjFiZjY3NGMyZjk5YWRmYzEwNTMxNzcyN2Rl %250AMDY6DnJldHVybl90byIkaHR0cDovL3R3aXR0ZXIuY29tL3NvZnRwZWRpYW1h %250AYw%253D%253D--dfa30d93e80be97e1404abbb466f2c6191816d69; __utmc=43838368 Authorization: Basic Z21hc2JhYnk6eW95b2JhYnk= *Post Data: Content-type: application/x-www-form-urlencoded Content-length: 303 oauth%5Fnonce=4280oauth%5Fsignature%5Fmethod=HMAC%2DSHA1oauth %5Ftimestamp=1259117789status=%40vincenthpchan%20%28O%3Aoauth %5Fversion=1%2E0oauth%5Fconsumer%5Fkey=WiW3RrjmAhPvWvTn6oPLAoauth %5Fsignature=dZ0OBySJzAZsdhwUKvK9zaIamE4%3Doauth %5Ftoken=65577017%2DK65DjHAcUbYOEJW5XMVnVuAkRy8fDnNnVGRZDOSAQ I wonder it is the problem about oauth_signature, but I don't what wrong with it. Thanks you very much ;-)