[twitter-dev] Re: Always returned "Failed to validate oauth signature and token"

2009-07-05 Thread muramastu


Thanks a lot!
After fixing this upper case issue and I also found there is a
misunderstanding about base string URL encoding, the request token can
be returned now.

Thanks everyone ~

On Jul 6, 1:04 pm, JDG  wrote:
> from the oauth core section on parameter encoding:
>
> Hexadecimal characters in encodings MUST be upper case.[1]
>
> Your string has %2b and %3d. You should see if that's causing it.
>
> [1]http://oauth.net/core/1.0/#signing_process
> On Sun, Jul 5, 2009 at 21:01, muramastu  wrote:
>
> > Thanks~
> > I've also tried "GET" method, however, it still returned same message.
> > The following is the data:
>
> > #Base String:
> >    GET%26HTTP://twitter.com/oauth/request_token%26oauth_consumer_key
> > %3d6RfEXDtG3UBD1JFpUCPtg%26oauth_nonce
> > %3d1246848991%26oauth_signature_method%3dHMAC-SHA1%26oauth_timestamp
> > %3d1246848991%26oauth_version%3d1.0
>
> > #Signature: (after HMAC-SHA1 encrypted, Base64 encoding and URL
> > encoding)
> >     MXMwzBjqXWuNZrGpYi2OoBS%2bEdY%3d
>
> > #HTTP request header I sent: (use GET as the HTTP method,
> > HttpSendRequest() )
> >     Authorization: OAuth
> > oauth_consumer_key="6RfEXDtG3UBD1JFpUCPtg",oauth_signature_method="HMAC-
> > SHA1",oauth_signature="MXMwzBjqXWuNZrGpYi2OoBS%2bEdY
>
> > %3d",oauth_timestamp="1246848991",oauth_nonce="1246848991",oauth_version="1­.0"
>
> > On Jul 3, 10:19 pm, Abraham Williams <4bra...@gmail.com> wrote:
> > > Based onhttp://
> > apiwiki.twitter.com/Twitter-REST-API-Method%3A-oauth-request_t...
> > > should be using a GET.
>
> --
> Internets. Serious business.- Hide quoted text -
>
> - Show quoted text -


[twitter-dev] Re: Always returned "Failed to validate oauth signature and token"

2009-07-05 Thread JDG
from the oauth core section on parameter encoding:

Hexadecimal characters in encodings MUST be upper case.[1]

Your string has %2b and %3d. You should see if that's causing it.

[1] http://oauth.net/core/1.0/#signing_process

On Sun, Jul 5, 2009 at 21:01, muramastu  wrote:

>
>
> Thanks~
> I've also tried "GET" method, however, it still returned same message.
> The following is the data:
>
> #Base String:
>GET%26HTTP://twitter.com/oauth/request_token%26oauth_consumer_key
> %3d6RfEXDtG3UBD1JFpUCPtg%26oauth_nonce
> %3d1246848991%26oauth_signature_method%3dHMAC-SHA1%26oauth_timestamp
> %3d1246848991%26oauth_version%3d1.0
>
> #Signature: (after HMAC-SHA1 encrypted, Base64 encoding and URL
> encoding)
> MXMwzBjqXWuNZrGpYi2OoBS%2bEdY%3d
>
> #HTTP request header I sent: (use GET as the HTTP method,
> HttpSendRequest() )
> Authorization: OAuth
> oauth_consumer_key="6RfEXDtG3UBD1JFpUCPtg",oauth_signature_method="HMAC-
> SHA1",oauth_signature="MXMwzBjqXWuNZrGpYi2OoBS%2bEdY
>
> %3d",oauth_timestamp="1246848991",oauth_nonce="1246848991",oauth_version="1.0"
>
>
> On Jul 3, 10:19 pm, Abraham Williams <4bra...@gmail.com> wrote:
> > Based onhttp://
> apiwiki.twitter.com/Twitter-REST-API-Method%3A-oauth-request_t...
> > should be using a GET.
>



-- 
Internets. Serious business.


[twitter-dev] Re: Always returned "Failed to validate oauth signature and token"

2009-07-05 Thread muramastu


Thanks~
I've also tried "GET" method, however, it still returned same message.
The following is the data:

#Base String:
GET%26HTTP://twitter.com/oauth/request_token%26oauth_consumer_key
%3d6RfEXDtG3UBD1JFpUCPtg%26oauth_nonce
%3d1246848991%26oauth_signature_method%3dHMAC-SHA1%26oauth_timestamp
%3d1246848991%26oauth_version%3d1.0

#Signature: (after HMAC-SHA1 encrypted, Base64 encoding and URL
encoding)
MXMwzBjqXWuNZrGpYi2OoBS%2bEdY%3d

#HTTP request header I sent: (use GET as the HTTP method,
HttpSendRequest() )
Authorization: OAuth
oauth_consumer_key="6RfEXDtG3UBD1JFpUCPtg",oauth_signature_method="HMAC-
SHA1",oauth_signature="MXMwzBjqXWuNZrGpYi2OoBS%2bEdY
%3d",oauth_timestamp="1246848991",oauth_nonce="1246848991",oauth_version="1.0"


On Jul 3, 10:19 pm, Abraham Williams <4bra...@gmail.com> wrote:
> Based 
> onhttp://apiwiki.twitter.com/Twitter-REST-API-Method%3A-oauth-request_t...
> should be using a GET.


[twitter-dev] Re: Always returned "Failed to validate oauth signature and token"

2009-07-03 Thread Abraham Williams
Based on
http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-oauth-request_tokenyou
should be using a GET.

On Fri, Jul 3, 2009 at 04:58, muramastu  wrote:

>
> Dears,
>
>   I'm trying to write a win32 desktop application to access
> twitter.com by using C++ and stopped at the 1st step of OAuth process
> - "Request a request token".  When the HTTP request is sent, the
> message returned from server is "Failed to validate oauth signature
> and token". Could anyone give me a suggestion?   Thanks in advance!
> The following is my data:
>
> #Base String:
>POST%26HTTP://twitter.com/oauth/request_token%26oauth_consumer_key
> %3d6RfEXDtG3UBD1JFpUCPtg%26oauth_nonce
> %3d1246610475%26oauth_signature_method%3dHMAC-SHA1%26oauth_timestamp
> %3d1246610475
>
> #Signature: (after HMAC-SHA1 encrypted, Base64 encoding and URL
> encoding)
>OWDOwL0y6L8BUCXT2n%2b8hrw9wkA%3d
>
> #HTTP request header I sent: (use POST as the HTTP method)
>Authorization: OAuth
> oauth_consumer_key="6RfEXDtG3UBD1JFpUCPtg",oauth_signature_method="HMAC-
> SHA1",oauth_signature="OWDOwL0y6L8BUCXT2n%2b8hrw9wkA
> %3d",oauth_timestamp="1246610475",oauth_nonce="1246610475"
>



-- 
Abraham Williams | Community Evangelist | http://web608.org
Hacker | http://abrah.am | http://twitter.com/abraham
Project | http://fireeagle.labs.poseurtech.com
This email is: [ ] blogable [x] ask first [ ] private.