Search code examples
google-apps-scriptgoogle-people-api

I want use 'contactGroups.delete' by GAS


I want use 'contactGroups.delete' by GAS I don't understand why it's an error

People.ContactGroups.delete({ "resourceName" : "contactGroups/8d49618c890eb1" });

error

TypeError: People.ContactGroups.delete is not a function

reference


Solution

  • When I saw the autocomplete of the script editor, it seems that People.ContactGroups.remove(resourceName: string, optionalArgs: Object). Ref And, if your resourceName is the valid value, how about the following modification?

    People.ContactGroups.remove("contactGroups/8d49618c890eb1");
    
    • As additional information, if you want to use deleteContacts, please use it like People.ContactGroups.remove("contactGroups/8d49618c890eb1", {deleteContacts: true});. Ref