Google, people api, how can I create a contact in a group

梦想的初衷 提交于 2021-01-29 09:56:12

问题


With people.createContact I can easily create a contact in myContacts.

But how do I create a contact in a special group ??


回答1:


You can create the contact with the method - people.createContact, as you are probably already doing.

All you have to change is to specify a membership:

"memberships": [
    {
      "contactGroupMembership": {
        "contactGroupResourceName": "contactGroups/PASTE_HERE_THE_NAME_OF_THE_GROUP"
      }
    }
  ]

Have a look at this sample.



来源:https://stackoverflow.com/questions/60000605/google-people-api-how-can-i-create-a-contact-in-a-group

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!