Method: people.createContact
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-06 (世界標準時間)。
[null,null,["上次更新時間: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"]]