Hi,

Since this seems to be a problem with OAuth, can you ask in the
Accounts forum?

http://groups.google.com/group/Google-Accounts-API

Cheers,
-Jeff

On Sep 25, 7:45 am, K_Reverter <[EMAIL PROTECTED]> wrote:
> This is part of my code (CSharp):
>
>             string token = Request["oauth_token"];
>             string token_secret = Request["ts"];
>
>             string url = "http://docs.google.com/feeds/documents/
> private/full";
>             string key="account.step1.cn";
>             string secret="7QEG49HkGOhXbhA3********";
>             string nUrl,nParams;
>
>             string timStamp=oab.GenerateTimeStamp();
>             string nonce=oab.GenerateNonce();
>             string signature = oab.GenerateSignature(new Uri(url),
> key, secret, token, token_secret, "GET", timStamp, nonce, out nUrl,
> out nParams);
>             HttpWebRequest request =
> (HttpWebRequest)WebRequest.Create(new Uri(nUrl));
>
>             string authStr = "OAuth ";
>             authStr += "oauth_version=\"1.0\", ";
>             authStr += "oauth_nonce=\"" + nonce + "\", ";
>             authStr += "oauth_timestamp=\"" + timStamp + "\", ";
>             authStr += "oauth_consumer_key=\"" + key + "\", ";
>             authStr += "oauth_token=\"" + token + "\", ";
>             authStr += "oauth_signature_method=\"HMAC-SHA1\", ";
>             authStr += "oauth_signature=\"" + oab.UrlEncode(signature)
> + "\"";
>             request.Headers.Add("Authorization", authStr);
>
>             request.Method = "GET";
>                 HttpWebResponse response =
> (HttpWebResponse)request.GetResponse();//Throw Exception here
>                StreamReader inputStream == new
> StreamReader(response.GetResponseStream());
>                 string result = inputStream.ReadToEnd();
>
> Why return a 401 error every time?please help me!
> Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Data Protocol" 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/google-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to