I ran into this as well, only on a few of the endpoints I was trying to hit. In my case, I'd left off the ".json" at the end of the request url. Seems like the service would have given a better message than "Could not authenticate with OAuth."
On Mar 31, 10:03 am, Mauro Asprea <mauroasp...@gmail.com> wrote: > Hi guys, I placed an issue reprot here > ->http://code.google.com/p/twitter-api/issues/detail?id=2131 > > I am trying to post a Tweet using the REST > endpoint: 1/statuses/update.json. It seems that, somehow, the oauth_token is > broken or something, because If the user would have deleted or > de-authenticated from my app I would expect another error message. I am > retrying this call forever (or until google clears the GAE Task Queue) until > have confirmation that this would be working or not, only then I will > discard the task. So this request will keep hitting twitter API if you need > to debug or something. > > I really don't know what is going on. This is the code of the response and > the headers: > code=401, > headers={'status': '401 Unauthorized', 'x-google-cache-control': > 'remote-fetch', 'set-cookie': 'k=64.233.172.20.1301586772265895; path=/; > expires=Thu, 07-Apr-11 15:52:52 GMT; domain=.twitter.com, > guest_id=130158677226961885; path=/; expires=Sat, 30 Apr 2011 15:52:52 GMT, > _twitter_sess=BAh7CDoPY3JlYXRlZF9hdGwrCDIBngwvAToHaWQiJTE3YzVhZjIyNGNiMzhi%250AZTAyZTFkOTg0OWJlYTQ3YTdjIgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVy%250AOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--2c81d715cadd3b68aa2e26aab3e8b3a6d70e86da; > domain=.twitter.com; path=/; HttpOnly', 'expires': 'Thu, 31 Mar 2011 > 15:57:52 GMT', 'vary': 'Accept-Encoding', 'connection': 'close', 'server': > 'hi', 'x-runtime': '0.00554', 'via': 'HTTP/1.1 GWA', 'cache-control': > 'no-cache, max-age=300', 'date': 'Thu, 31 Mar 2011 15:52:52 GMT', > 'content-type': 'application/json; charset=utf-8', 'www-authenticate': > 'OAuth realm="http://api.twitter.com"'}, > content={"request":"\/1\/statuses\/update.json?oauth_version=1.0&oauth_token=38219986-L9k5mARqijzZbQkMCuXuAoDTQpZM6Fk39C3160Z8Q&oauth_nonce=42ee2e14c60a4448a7aedf3321e0ed14&oauth_timestamp=1301586772&oauth_signature=NgD37QLCIYlsZJGBjNu9Kw9o8PA%3D&oauth_consumer_key=bTnd58yyvq8xTNDyXDyfsA&oauth_signature_method=HMAC-SHA1","error":"Could > not authenticate with OAuth."} > > Thanks > -- > Mauro Sebastián Asprea > > E-Mail: mauroasp...@gmail.com > Mobile: +34 654297582 > Skype: mauro.aspreahttp://www.wishandbam.com/ > > Algunos hombres ven las cosas como son y se preguntan porque. Otros sueñan > cosas que nunca fueron y se preguntan por qué no?. > George Bernard Shaw -- Twitter developer documentation and resources: https://dev.twitter.com/doc API updates via Twitter: https://twitter.com/twitterapi Issues/Enhancements Tracker: https://code.google.com/p/twitter-api/issues/list Change your membership to this group: https://groups.google.com/forum/#!forum/twitter-development-talk