Google admin sdk 已创建Google G-Suite共享联系人缺少姓名和标题
我已经编写了一个脚本,用于在我的G-Suite域中创建共享联系人。我已经完成了OAuth工作,并且能够创建联系人 但是,当我创建联系人时,它并不包含我提交的所有数据。例如,它没有名称数据或标题信息 我尝试使用谷歌在这里的例子: 这正是我要发布的内容:Google admin sdk 已创建Google G-Suite共享联系人缺少姓名和标题,google-admin-sdk,Google Admin Sdk,我已经编写了一个脚本,用于在我的G-Suite域中创建共享联系人。我已经完成了OAuth工作,并且能够创建联系人 但是,当我创建联系人时,它并不包含我提交的所有数据。例如,它没有名称数据或标题信息 我尝试使用谷歌在这里的例子: 这正是我要发布的内容: <atom:entry xmlns:atom='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'> <atom:categor
<atom:entry xmlns:atom='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'>
<atom:category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact' />
<gd:name>
<gd:givenName>Elizabeth</gd:givenName>
<gd:familyName>Bennet</gd:familyName>
<gd:fullName>Elizabeth Bennet</gd:fullName>
</gd:name>
<atom:content type='text'>Notes</atom:content>
<gd:email rel='http://schemas.google.com/g/2005#work' primary='true' address='liz@gmail.com' displayName='E. Bennet' />
<gd:email rel='http://schemas.google.com/g/2005#home' address='liz@example.org' />
<gd:phoneNumber rel='http://schemas.google.com/g/2005#work' primary='true'>(206)555-1212</gd:phoneNumber>
<gd:phoneNumber rel='http://schemas.google.com/g/2005#home'>(206)555-1213</gd:phoneNumber>
<gd:im address='liz@gmail.com' protocol='http://schemas.google.com/g/2005#GOOGLE_TALK' primary='true' rel='http://schemas.google.com/g/2005#home' />
<gd:structuredPostalAddress rel='http://schemas.google.com/g/2005#work' primary='true'>
<gd:city>Mountain View</gd:city>
<gd:street>1600 Amphitheatre Pkwy</gd:street>
<gd:region>CA</gd:region>
<gd:postcode>94043</gd:postcode>
<gd:country>United States</gd:country>
<gd:formattedAddress>1600 Amphitheatre Pkwy Mountain View</gd:formattedAddress>
</gd:structuredPostalAddress>
</atom:entry>
伊丽莎白
班纳特
伊丽莎白·班纳特
笔记
(206)555-1212
(206)555-1213
山景
1600圆形剧场Pkwy
加利福尼亚州
94043
美国
1600圆形剧场Pkwy山景酒店
它创建联系人,但缺少姓名、标题等
这是邮件返回的内容:
<?xml version='1.0' encoding='UTF-8' ?>
<entry xmlns='http://www.w3.org/2005/Atom' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' xmlns:gContact='http://schemas.google.com/contact/2008'>
<id>http://www.google.com/m8/feeds/contacts/compcc.com/base/36b40df989628b57</id>
<updated>2017-01-17T15:42:32.736Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact' />
<title type='text'></title>
<content type='text'>Notes</content>
<link rel='http://schemas.google.com/contacts/2008/rel#edit-photo' type='image/*' href='https://www.google.com/m8/feeds/photos/media/compcc.com/36b40df989628b57/1B2M2Y8AsgTpgAmY7PhCfg' />
<link rel='self' type='application/atom+xml' href='https://www.google.com/m8/feeds/contacts/compcc.com/full/36b40df989628b57' />
<link rel='edit' type='application/atom+xml' href='https://www.google.com/m8/feeds/contacts/compcc.com/full/36b40df989628b57/1484667752736001' />
<gd:email rel='http://schemas.google.com/g/2005#work' address='liz@gmail.com' primary='true' />
<gd:email rel='http://schemas.google.com/g/2005#home' address='liz@example.org' />
<gd:im address='liz@gmail.com' primary='true' protocol='http://schemas.google.com/g/2005#GOOGLE_TALK' rel='http://schemas.google.com/g/2005#home' />
<gd:phoneNumber rel='http://schemas.google.com/g/2005#work' primary='true'>(206)555-1212</gd:phoneNumber>
<gd:phoneNumber rel='http://schemas.google.com/g/2005#home'>(206)555-1213</gd:phoneNumber>
</entry>"
http://www.google.com/m8/feeds/contacts/compcc.com/base/36b40df989628b57
2017-01-17T15:42:32.736Z
笔记
(206)555-1212
(206)555-1213
"
有人知道这是什么原因吗
谢谢。在谷歌开了一张罚单之后,他们给了我以下指导。在实现了新的示例XML后,我能够创建一个新的带有标题的共享联系人。这满足了我的需要 以下是我收到的: 关于您遇到的问题,我能够测试和 复制你所遇到的行为。每当我遵循 该示例创建了共享联系人,但它是联系人的一部分 信息不完整。我将立即报告此事 以更新您所指的文章 在调查和运行其他测试之后,我能够 API按预期工作,我能够添加域共享联系人 我注意到域名共享了联系人 API使用Google数据API将信息推送到您的域 能够从Google数据API和it中找到一个官方示例 似乎工作如预期。你可以检查我的例子 这里指的是 下面我将包括我用作参考的示例(请注意 我从上提供的示例中删除了“组织”部分 以上链接):
伊丽莎·本恩
我的好朋友,莉斯。有时判断有点快,但很好的女孩。
(206)555-1212
(206)555-1213
(206) 555-1212
1600圆形剧场Pkwy
加利福尼亚州山景城94043
主街800号
加利福尼亚州山景城94041
您应该能够使用上述示例并添加外部联系人
到您的共享联系人目录。我将非常乐意为您服务
这些步骤将与您一起测试并确保API正常工作
如预期。注意:请确保您使用的是GData版本:3.0
如果这种行为仍然发生,您是否尝试过使用检索它?@Mr.Rebot-是的,确实如此。我最终向谷歌开了一张罚单,他们给了我一个解决方案。我将很快发布。
<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/contact/2008#contact'/>
<title>Eliza Benne</title>
<content>My good friend, Liz. A little quick to judge sometimes, but nice girl.</content>
<gd:email rel='http://schemas.google.com/g/2005#work' primary='true' address='lizi@gmail.com'/>
<gd:email rel='http://schemas.google.com/g/2005#home' address='lizi@example.org'/>
<gd:phoneNumber rel='http://schemas.google.com/g/2005#work' primary='true'>
(206)555-1212
</gd:phoneNumber>
<gd:phoneNumber rel='http://schemas.google.com/g/2005#home'>
(206)555-1213
</gd:phoneNumber>
<gd:phoneNumber rel='http://schemas.google.com/g/2005#mobile'>
(206) 555-1212
</gd:phoneNumber>
<gd:im rel='http://schemas.google.com/g/2005#home'
protocol='http://schemas.google.com/g/2005#GOOGLE_TALK'
address='lizi@gmail.com'/>
<gd:postalAddress rel='http://schemas.google.com/g/2005#work' primary='true'>
1600 Amphitheatre Pkwy
Mountain View, CA 94043
</gd:postalAddress>
<gd:postalAddress rel='http://schemas.google.com/g/2005#home'>
800 Main Street
Mountain View, CA 94041
</gd:postalAddress>
</entry>