group_get_invite_link
Get an invite link for an existing group (Telegram, WhatsApp) or Discord server.
What this does:
Telegram: mints a FRESH link (e.g. t.me/+...) on every call; previously issued links stay valid
WhatsApp: returns the group's EXISTING link, the same one each time. Do not describe it to anyone as newly issued
Discord: mints a permanent discord.gg/... link into a server the account is in (chat_id: the server id, a channel id, or a channel's thread ref); the account needs Create Invite there
Requires the connected account to be the group's owner or an admin with invite rights
When to use:
A member can't be added directly because their privacy settings block invites (group.add_member fails with a privacy error) — send them this link instead
Onboarding people to a private group
Returns: success, chat_id, invite_link.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | Yes | Channel where the group exists (e.g., 'telegram', 'whatsapp', 'discord') | |
| chat_id | Yes | ID of the group/channel to export an invite link for. Group id exactly as `group.list` reports it: a signed numeric id on Telegram, or a JID ending in @g.us on WhatsApp. A WhatsApp group has no numeric id, so this is a string either way. Read it from `group.list`; never compose one. Discord: the server id, a channel id, or the channel's thread ref (discord:<account>:<channel>) from channels.list. | |
| account_id | No | Which of the workspace's accounts on this channel mints the link (from channels.list). OMIT with one account. | |
| in_workspace | No | Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected. |