Sign inGet started

Rotate a WhatsApp group's invite link

POST
/v1/whatsapp/groups/{group_id}/invite-link/rotate
const link = await bird.whatsapp.groups.inviteLink.rotate("wag_01krdgeqcxet5s7t44vh8rt9mg");
console.log(link.invite_link); // every earlier link has stopped working
响应200
{
  "invite_link": "https://chat.whatsapp.com/JZm4S9tCkQx2LpVr7Ny8Ab"
}
Issues a new invite link for the group. Every link issued before stops working, so anyone still holding one cannot join. Rotate the link when a link has spread further than you intended, or after removing someone you do not want back.
Rotating is not how you read the current link: the group carries its invite_link, so GET /v1/whatsapp/groups/{group_id} is the read. Only an active group has a link to rotate; any other status returns a 409 WhatsAppGroupNotActive.
Like pinning and unpinning, this answers 200 rather than 202. WhatsApp issues the new link in its own reply and sends no webhook for a rotation, so the link in the response is the rotation itself having happened, not an acknowledgement that it will.
参数
group_id
string
ID of the group whose invite link is being replaced.
响应载荷
invite_link
string
必填
The group's one invite link. Every link the group had before this one stops working.