On Apr 11, 2011, at 4:29 AM, greenfish wrote:
> i'll make a google api client application in Windows with liboauth(c+
> +).
>
> my consumer key is "greenfishblog.tistory.com" and
> customersecret is "Eo/rFfNmK4NGxYlvGpdrK+fF".
>
> but, on requesting a token, the reply from google is
> "signature_invalid.base_string".
> what's ploblem?
>
>
>
> #include "oauth.h"
> ...
> oauth_split_url_parameter("https://www.google.com/accounts/
> OAuthGetRequestToken", &argv);
> oauth_sign_array2_process(&argc, &argv, NULL, OA_HMAC, NULL,
> "greenfi", "Eo/r...", NULL, NULL);
> req_hdr = oauth_serialize_url_sep(argc, 1, argv, ", ", 6);
> req_url = oauth_serialize_url_sep(argc, 0, argv, ", ", 1);
> sprintf(http_hdr, "Authorization: OAuth scope=\"%s\", %s", ("http://
> www.google.com/calendar/feeds/default/allcalendars/full"), req_hdr);
> reply = oauth_http_get2("https://www.google.com/accounts/
> OAuthGetRequestToken", NULL, http_hdr);
>
> at last,
> reply is "signature_invalid.base_string:GET&http ..."
Pseudo code is not very useful for debugging.
A shot in the dark: If you use an OAuth scope header, it needs to add it to
the request parameters to be singed.
oauth_split_url_parameter("https://my.url?scope=MYOAUTHSCOPE";,...);
best,
robin
--
You received this message because you are subscribed to the Google Groups
"OAuth" group.
To post to this group, send email to oauth@googlegroups.com.
To unsubscribe from this group, send email to
oauth+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/oauth?hl=en.