开发者

Invalid Signature for Google Calendar

开发者 https://www.devze.com 2023-03-03 19:11 出处:网络
I have read all the discussions here and have studied Google\'s APIs and OAuth spec, but I\'m still getting an invalid sig开发者_如何学Cnature.

I have read all the discussions here and have studied Google's APIs and OAuth spec, but I'm still getting an invalid sig开发者_如何学Cnature.

I've tried using POST and GET, using Headers and Parameters, but still missing something. (Probably something easy or stupid.)

I have been successful using Hammock to retrieve a Request Token from Twitter so I'm perplexed as to what I'm leaving out for Google.

I'm writting this for Windows Phone 7 using VS 2010 Express and the Windows Phone 7 version of Hammock. Here is my code, please give me some advice.

    var requestTokenCredentials = OAuthCredentials.ForRequestToken("anonymous", "anonymous", "oob");

    var client = new RestClient();
    client.Authority = "https://www.google.com";
    client.Credentials = requestTokenCredentials; 
    client.HasElevatedPermissions = true;
    client.AddParameter("scope", GoogleURIs.myScope);

    var request = new RestRequest();
    request.Path = "/accounts/OAuthGetRequestToken";
    client.BeginRequest(request, RequestCallback, client);

Richard


After more research on Google OAuth APIs I decided to use OAuth V2. Google recomends using the new version and, so far, it has worked well.


Just a guess: Does Google's APIs require to send a valid referer ? Because I think it's not possible with the current version of the SDK to change the referer (but it will be with the Mango - 7.1 release as the beta only remove the bad referer i.e. the guid ID of the app when using the Image control for example).

0

精彩评论

暂无评论...
验证码 换一张
取 消