Google 工作区:更新 google 个人资料中的生日

Google Workspace: Update birthday in google profile

我是 google API 的新手,我在这里有点困惑。我想使用 python.

在 google 个人资料中更新个人生日

我可以用 People API 方法 people.listDirectory 过生日。但是那里没有像 setupdate 这样的方法。我找到的最接近的东西是 updateContact,虽然它有字段 birthday,但我不确定这是否正确。用户可以为他们的联系人设置生日吗?我在我的联系人中没有看到这样的选项。另外,我不能在那里使用别名 people/me,当我使用从 listDirectoryPeople 获得的 resourceName 时,我得到一个

Resource name {resourceName} is not a valid contact person resource.

我可以使用目录 API 方法 users.update 更新用户数据。但是这个用户没有生日字段。

那么,有可能吗?

所以根据 Google's documentation 人民 API:

The People API lets you:

Read and manage the authenticated user's Contacts
Read and copy the authenticated user's Other contacts
Read profile information for authenticated users and their contacts
Read domain profiles and contacts

如果我正确理解您的问题,您似乎不想更改经过身份验证的用户联系人之一的生日,而是更改经过身份验证的用户自己的生日。不幸的是,Google 人 API 似乎没有此功能。我查看了 Google 文档中的其他地方,但无法找到允许以编程方式直接编辑个人资料生日的地方。有可能我错过了什么,但老实说,这并不让我感到惊讶。编程更新一个人的生日似乎不是一个好功能,因为一个人的生日应该在创建帐户时设置,并且只有在出错时才进行编辑,这可以通过用户界面轻松完成。