我对GAS很新。我试图了解AdminDirectory Service如何更新用户信息。 https://developers.google.com/admin-sdk/directory/v1/reference/users
这是我的代码,出了什么问题?
function updateUserInfos (){
var opt = phones{
type : "work",
value : "999999",
primary : true
};
var updates = AdminDirectory.Users.update(opt, "user@domain.com")
}
非常感谢
答案 0 :(得分:0)
Try
function updateUserInfos (){
var opt = {"phones":[{
"type" : "work",
"value" : "999999",
primary : true
}]
};
var updates = AdminDirectory.Users.update(opt, "user@domain.com")
}
if multiple phones
var opt = {"phones":[{"type" : "work",
"value" : "999999",
primary : true}],
[{"type" : "mobile",
"value" : "88888" }]
};
Stéphane