Changing the Group Name

A group owner can change the name of their existing group with the changeGroupName() method:

The following sample code shows how to change the group name to "myNewGroupname".

  • var newGroupName = "myNewGroupName";
    
    // Change the group name.
    group.changeGroupName(newGroupName, {
      success: function(theGroup) {
        // Do something.
      },
      failure: function(theGroup, errorString) {
        // Handle the error.
      }
    });
  • var newGroupName = "myNewGroupName";
    
    // Change the group name.
    group.changeGroupName(newGroupName).then(
      function(theGroup) {
        // Do something.
      },
    ).catch(
      function(error) {
        var theGroup = error.target;
        var errorString = error.message;
        // Handle the error.
      }
    );

The group name can be up to 190 characters. There is no restriction on the characters you can use. The group name can duplicate with the existing ones.

Changing the group name does not change the ID nor URI of the group.