> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-audit-content-webhooks.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Transfer Group Ownership

> Transfer CometChat group ownership to another member in React Native apps before the current owner leaves the group.

<Accordion title="AI Integration Quick Reference">
  ```javascript theme={null}
  // Transfer group ownership
  await CometChat.transferGroupOwnership("GUID", "NEW_OWNER_UID");
  ```

  **Note:** Only the current group owner can transfer ownership. The owner must transfer ownership before leaving the group.
</Accordion>

Transfer ownership of a group to another member. Only the current owner can do this, and since owners cannot leave their group, you must transfer ownership first if you want to leave. See [Leave Group](/sdk/react-native/leave-group).

## Transfer Ownership

Use `transferGroupOwnership()` to transfer ownership to another group member.

<Tabs>
  <Tab title="TypeScript">
    ```typescript theme={null}
    let GUID: string = "GUID";
    let UID: string = "UID";
    CometChat.transferGroupOwnership(GUID, UID).then(
      (ownershipTransferred: string) => {
          console.log("Successfully transferred ownership of the group.");
      }, error => {
          console.log("Could not transfer ownership of the group: ", error);
      }
    );
    ```
  </Tab>

  <Tab title="JavaScript">
    ```javascript theme={null}
    let GUID = "GUID";
    let UID = "UID";
    CometChat.transferGroupOwnership(GUID, UID).then(
      () => {
          console.log("Successfully transferred ownership of the group.");
      }, error => {
          console.log("Could not transfer ownership of the group: ", error);
      }
    )
    ```
  </Tab>
</Tabs>

| Parameter | Description                                   |
| --------- | --------------------------------------------- |
| `GUID`    | The GUID of the group                         |
| `UID`     | The UID of the member to become the new owner |

On success, the method resolves with a success message string confirming the operation. The new owner gets admin scope and the previous owner becomes a participant.

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Leave Group" icon="right-from-bracket" href="/sdk/react-native/leave-group">
    Leave a group after transferring ownership
  </Card>

  <Card title="Change Member Scope" icon="user-gear" href="/sdk/react-native/group-change-member-scope">
    Promote or demote group members
  </Card>

  <Card title="Kick & Ban Members" icon="user-slash" href="/sdk/react-native/group-kick-ban-members">
    Remove or restrict members from a group
  </Card>

  <Card title="Delete a Group" icon="trash" href="/sdk/react-native/delete-group">
    Permanently delete a group
  </Card>
</CardGroup>
