Just another comment... by looking at the working sample at the OAuth playground it looks like the token and verifier are double encoded in the base string (so a forward slash is "%252F") and single escaped in the GET param sent to /OAuthGetAccessToken (so a foward slash is "%2F"). Does that seem right?
On Aug 30, 11:56 am, bourds <[email protected]> wrote: > Hello, > > So I grabbed a copy of the open-sourced OAuth Playground code and I'm > currently tweaking it to my own use case. I have most everything > working except that my call to /OAuthGetAccessToken is returning > "signature_invalid base_string". I have spent quite a bit of time > tracing the code and comparing the requests I'm making (though > playground.php) to /OAuthGetAccessToken with the ones made > throughhttp://googlecodesamples.com/oauth_playground/and I'm having a very > difficult time figuring out where I'm going wrong. I'm guessing I am > not encoding/decoding something correctly? > > I have pasted some debug output below for your reading pleasure and > you can even test it out at: > > http://test.snazzy-software.com/play/recipes.php > > Any help would be greatly appreciated. Thanks! > > SteveBwww.snazzy-software.com > > recipes.php: OAuthToken from /OAuthAuthorizeToken > ----------------------------------------------------- > 4/ylZPiZxQ6P-5mk16rXVZsmRdK5Ex > > recipes.php: OAuthVerifier from /OAuthAuthorizeToken > ----------------------------------------------------- > dGaHruPKiu2saK9bzE11j6V > > recipes.php: My URL to playground.php > -----------------------------------------------------http://test.snazzy-software.com/play/playground.php?action=access_tok... > > playground.php: URL to /OAuthGetAccessToken > -----------------------------------------------------https://www.google.com/accounts/OAuthGetAccessToken?oauth_version=1.0... > > playground.php: base string used > ----------------------------------------------------- > GET&https%3A%2F%2Fwww.google.com%2Faccounts > %2FOAuthGetAccessToken&oauth_consumer_key%3Dtest.snazzy-software.com > %26oauth_nonce%3D31a19440fb5e2bf2dec6256286cc6acf > %26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp > %3D1283182615%26oauth_token%3D4%252FylZPiZxQ6P-5mk16rXVZsmRdK5Ex > %26oauth_verifier%3DdGaHruPKiu2saK9bzE11j6V%2520%26oauth_version%3D1.0 > > playground.php: Response from google > ----------------------------------------------------- > signature_invalid base_string:GET&https%3A%2F%2Fwww.google.com > %2Faccounts%2FOAuthGetAccessToken&oauth_consumer_key%3Dtest.snazzy- > software.com%26oauth_nonce%3D31a19440fb5e2bf2dec6256286cc6acf > %26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp > %3D1283182615%26oauth_token%3D4%252FylZPiZxQ6P-5mk16rXVZsmRdK5Ex > %26oauth_verifier%3DdGaHruPKiu2saK9bzE11j6V%2520%26oauth_version%3D1.0 -- You received this message because you are subscribed to the Google Groups "OAuth" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/oauth?hl=en.
