Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gmail google Contact api支持两条腿的OAuth 2.0吗?_Gmail_Contacts_Impersonation_Accounts - Fatal编程技术网

Gmail google Contact api支持两条腿的OAuth 2.0吗?

Gmail google Contact api支持两条腿的OAuth 2.0吗?,gmail,contacts,impersonation,accounts,Gmail,Contacts,Impersonation,Accounts,我想模拟Gmail帐户联系人,但找不到如何使用两条腿的OAuth 2.0来实现这一点。 我正在使用C Google客户端库。Google没有为OAuth 2.0提供任何新的联系人API。您可以使用Google.GData.Contacts.dll执行联系人OAuth 2.0模拟。使用GOAuth2RequestFactory对象将访问令牌分配给联系人服务 OAuth2Parameters parameters = new OAuth2Parameters

我想模拟Gmail帐户联系人,但找不到如何使用两条腿的OAuth 2.0来实现这一点。
我正在使用C Google客户端库。

Google没有为OAuth 2.0提供任何新的联系人API。您可以使用Google.GData.Contacts.dll执行联系人OAuth 2.0模拟。使用GOAuth2RequestFactory对象将访问令牌分配给联系人服务

                OAuth2Parameters parameters = new OAuth2Parameters
           {
               AccessToken = _AccessToken
           };

            GOAuth2RequestFactory requestFactory = new GOAuth2RequestFactory(null, "GamailContactsReader", parameters);

            // Connecting the Contats service.
            ContactsService service = new Google.GData.Contacts.ContactsService("GamailContactsReader");
            service.RequestFactory = requestFactory;               

            GroupsQuery groupQuery = new GroupsQuery(GroupsQuery.CreateGroupsUri(_EmailAddress));
            groupQuery.NumberToRetrieve = int.MaxValue;

            GroupsFeed groupFeed = service.Query(groupQuery);

你能补充更多细节吗?你想用哪种语言?它是一个web应用程序吗?要导入联系人吗?请不要重复同样的问题。我们刚刚开始了Google Contacts API从OAuth1到OAuth2的迁移过程,使用Google Apps脚本-仍在收集信息-任何帮助/提示/代码都将不胜感激。