Header based authentication... do you mean setting method=Post?

When I did that, I got a Bad request and that I needed to make the request
via GET

{"error":"This method requires a
GET.","request":"\/1\/statuses\/user_timeline.json"}

I am using Shannon Whitley oAuth lib that he wrote, but have been toying
with using Hammock for our codebase.

Please explain thanks!

Paul

On Wed, Jul 6, 2011 at 8:25 PM, Georgooty varghese <georgo...@gmail.com>wrote:

>
> Hi,
>
> Use header based authentication..
>
>
> Regards,
> George
>
>
> On Wed, Jul 6, 2011 at 11:35 PM, Paul Shriner <p...@audiencepoint.com>wrote:
>
>> Matt, I am having the same problem and ti started right about the same
>> time as this post. Here are the details:
>>
>> Here are the response headers
>> ============================
>>
>> Status: 401 Unauthorized
>> X-Transaction: 1309969076-98811-26180
>> X-RateLimit-Limit: 350
>> X-Frame-Options: SAMEORIGIN
>> X-RateLimit-Remaining: 348
>> X-Runtime: 0.02492
>> Pragma: no-cache
>> X-Access-Level: read-write
>> X-RateLimit-Class: api_identified
>> X-Revision: DEV
>> X-MID: 4ea2b57c4cf85a22ee50fa2a7c5674aa26844059
>> X-RateLimit-Reset: 1309972621
>> Content-Length: 372
>> Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-
>> check=0
>> Content-Type: application/json; charset=utf-8
>> Date: Wed, 06 Jul 2011 16:17:57 GMT
>> Expires: Tue, 31 Mar 1981 05:00:00 GMT
>> Last-Modified: Wed, 06 Jul 2011 16:17:57 GMT
>> Set-Cookie: k=204.251.185.1.1309969076964694; path=/; expires=Wed, 13-
>> Jul-11 16:17:56 GMT;
>> domain=.twitter.com,guest_id=v1%3A130996907700036484;
>> domain=.twitter.com; path=/; expires=Sat, 06 Jul 2013 04:17:57
>> GMT,lang=en;
>>
>> path=/,_twitter_sess=BAh7CDoPY3JlYXRlZF9hdGwrCBTTPQAxAToHaWQiJWMxYWYyYTAzM2JlMjM3%250AYThjNmE1ZTViZTAyMGZlMTE4IgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVy
>>
>> %250AOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--13e6aa6dc4f9fb55afa9c2212509c53e04554bb6;
>> domain=.twitter.com; path=/; HttpOnly
>> Server: hi
>> WWW-Authenticate: OAuth realm="http://api.twitter.com";
>> Vary: Accept-Encoding
>> Connection: close
>>
>> Here are the contents of the message:
>>
>> <hash>
>> <error>This method requires authentication.</error>
>> -
>> <request>
>> /1/statuses/user_timeline.xml?
>>
>> count=100&oauth_consumer_key=4vqfXySDSPUncNbSQdrhnw&oauth_nonce=2886488&oauth_signature_method=HMAC-
>> SHA1&oauth_timestamp=1309974284&oauth_token=190741720-
>>
>> EzxXr983TNYs28xhdd3tG610rtnQPxiy5LpeOLww&oauth_version=1.0&user_id=573027936&oauth_signature=LnYtMOdMopPYtaNMCfl9E
>> +unjcA=
>> </request>
>> </hash>
>>
>>
>> No idea on where to start on this.
>> On Jun 23, 5:24 pm, Matt Harris <thematthar...@twitter.com> wrote:
>> > Hi dalvir,
>> >
>> > The REST API lives on the domain api.twitter.com not twitter.com. The
>> > request you are making should be made to:
>> >    http://api.twitter.com/1/statuses/user_timeline.json
>> >
>> > To understand the reason for the error you will need to inspect the
>> response
>> > that comes back from the API. We put more details about errors in the
>> > response body to help you identify what you need to do in your code.
>> >
>> > Best,
>> > @themattharris <
>> https://twitter.com/intent/follow?screen_name=themattharris>
>> > Developer Advocate, Twitter
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > On Thu, Jun 23, 2011 at 12:32 AM, dalvir <sainidal...@gmail.com> wrote:
>> > > I am  using the following code. This was working fine.
>> > >  oAuthTwitter oAuth = new oAuthTwitter();
>> > >                                oAuth.Token = "Token";
>> > >                                oAuth.TokenSecret = "secrentoken";
>> > >                                TwitterToken objtwitter = new
>> > > TwitterToken();
>> >
>> > > oAuth.oAuthWebRequest(oAuthTwitter.Method.GET, "http://twitter.com/
>> > > statuses/user_timeline.xml", null);//This line return the following
>> > > 401 error
>> > > But Now it stoped to work. and returning the error
>> > > The remote server returned an error: (401) Unauthorized.
>> >
>> > > Why this error is coming?
>> >
>> > > --
>> > > 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
>>
>> --
>> 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
>>
>
>  --
> 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
>



-- 
AudiencePoint - Because Timing Matters
p...@audiencepoint.com
425-679-4830
http://www.audiencepoint.com

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

Reply via email to