> ## Documentation Index
> Fetch the complete documentation index at: https://docs.livchat.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Invite Link

> Get the invite link for a WhatsApp group

Get the invite link that can be shared to add people to a group.

## Query Parameters

<ParamField query="groupJid" type="string" required>
  Group JID (e.g., `120362023605733675@g.us`)
</ParamField>

<Note>
  You must be an admin of the group to get the invite link.
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.livchat.ai/v1/groups/invite-link?groupJid=120362023605733675@g.us" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const groupJid = "120362023605733675@g.us";
  const response = await fetch(
    `https://api.livchat.ai/v1/groups/invite-link?groupJid=${groupJid}`,
    {
      headers: {
        Authorization: "Bearer YOUR_API_KEY",
      },
    }
  );

  const { data } = await response.json();
  console.log(`Invite link: ${data.inviteLink}`);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "code": 200,
    "data": {
      "inviteLink": "https://chat.whatsapp.com/HffXhYmzzyJGec61oqMXiz"
    }
  }
  ```

  ```json 403 theme={null}
  {
    "error": {
      "code": 403,
      "message": "Not authorized. You must be a group admin."
    }
  }
  ```
</ResponseExample>
