感谢Claudio Cherubino提出的建议。我实际上已经在使用那个范围。值得庆幸的是,我现在终于找到了答案。
我真的错过了一封信:
q.Uri = New Uri("http://www.google.com/m8/feeds/contacts/<EMAIL>/full/<IDCODE>")
......是错的,因为我要求的范围确实是:
https://www.google.com/m8/feeds/
所以Uri需要与httpS匹配。我添加了's'并且它有效。正确的代码如下:
q.Uri = New Uri("https://www.google.com/m8/feeds/contacts/<EMAIL>/full/<IDCODE>")
非常感谢这篇文章的答案: http://www.geoffmcqueen.com/2010/03/14/token-invalid-authsub-token-has-wrong-scope-oauth-google-problem
您必须请求访问Contacts API OAuth范围,即 https://www.google.com/m8/feeds/ 。
.NET客户端库包含使用Contacts API的OAuth 2.0示例:
https://code.google.com/p/google-gdata/source/browse/trunk/clients/cs/samples/oauth2_sample/oauth2demo.cs