是否可以使用Google Directory API存储用户的辅助电子邮件?
我只是尝试使用“电子邮件”属性(根据https://developers.google.com/admin-sdk/directory/v1/reference/users/insert),但是它没有用。
这是我正在使用的请求正文示例:
{
"name": {
"familyName": "John",
"givenName": "Doe",
"fullname": "John Doe"
},
"primaryEmail": "john.doe@somesite.edu.br",
"password": "somepasswordhere",
"emails": {
"address": "some.secondary.email.here@gmail.com",
"primary": false,
"type": "other",
},
"organizations": {
"name": "Some Organization",
"department": "Blah",
"title": "Test",
"type": "school",
},
"changePasswordAtNextLogin": true,
"relations": {
"type": "mother",
"value": "John's Mother"
}
}
答案 0 :(得分:0)
对不起。我不好。
“电子邮件”属性需要一个列表,而不是我放入的请求正文之类的对象。
因此,最终的请求正文为:
"emails": [{
"address": "some.secondary.email.here@gmail.com",
"primary": false,
"type": "other",
}],