401 error on request_token


#1

We are having a weird problem when we are trying to get the request_token.

I have tested whole of the script and it is working under localhost.
But when i put it online it will give a 401 response.

The key and secret are the same.
And the domain and subdomains are put under @anywhere
The script is read & write

If somewone could tell me what is wrong you are really helping me.


#2

Do you have more details about what the 401 response is? There’s always a message accompanying these errors. Review this post about common OAuth troubleshooting procedures: [node:204].


#3

ok the response whas “Failed to validate oauth signature and token”

I whas thinking it has to do with the timestamp but i could read tweets so it has to be something else


#4

Some methods drop to unauthenticated when faced with bad auth… just because you got a response from a public status method while using OAuth doesn’t mean the OAuth was valid. The HTTP response headers will indicate to you what context you’re being evaluated in.


#5

what should I do if my response was like this:

{Status: 401 Unauthorized
X-Transaction: 1318823683-12648-1868
X-Frame-Options: SAMEORIGIN
X-Runtime: 0.00927
Pragma: no-cache
X-Content-Type-Options: nosniff
X-Revision: DEV
X-MID: 7545366739022e239bc3379b444630f8ada3d4be
Content-Length: 44
Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0
Content-Type: text/html; charset=utf-8
Date: Mon, 17 Oct 2011 03:54:43 GMT
Expires: Tue, 31 Mar 1981 05:00:00 GMT
Last-Modified: Mon, 17 Oct 2011 03:54:43 GMT
Set-Cookie: k=14.161.37.102.1318823683490847; path=/; expires=Mon, 24-Oct-11 03:54:43 GMT; domain=.twitter.com,guest_id=v1%3A131882368349737413; domain=.twitter.com; path=/; expires=Wed, 16-Oct-2013 15:54:43 GMT,_twitter_sess=BAh7CDoPY3JlYXRlZF9hdGwrCKplBBAzAToHaWQiJTJjZTI4ZmRhZGEwNmE3%250AMjBhNzMwNGNlMmYwYjNmYjNkIgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVy%250AOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA–6954d3303291c49f597141bc2beee5d683d84ec5; domain=.twitter.com; path=/; HttpOnly
Server: hi
Vary: Accept-Encoding
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive

}


#6

#7