Method: people.createContact
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-06。
[null,null,["最后更新时间 (UTC):2024-08-06。"],[[["Creates a new contact and returns the person resource."],["Returns a 400 error if singleton fields (biographies, birthdays, genders, names) have more than one value specified."],["Requires sequential mutate requests for the same user to avoid latency and failures."],["Uses the `personFields` and `sources[]` query parameters to control data returned."],["Requires the `https://www.googleapis.com/auth/contacts` OAuth scope for authorization."]]],["This content outlines how to create a new contact using the Google People API. A `POST` request is sent to `https://people.googleapis.com/v1/people:createContact`. The request body should include a `Person` resource, and the response will return the created `Person`. Required query parameters include `personFields`, which specifies the data to return, and optionally `sources[]` to limit data sources. Only one field is allowed for `biographies`, `birthdays`, `genders`, and `names`. Sequential requests are recommended for multiple updates to the same user. It requires `https://www.googleapis.com/auth/contacts` authorization scope.\n"]]