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 workinglink = client.whatsapp.groups.invite_link.rotate("wag_01krdgeqcxet5s7t44vh8rt9mg")
print(link.invite_link) # every earlier link has stopped workinglink, err := client.Whatsapp.Groups.InviteLink.Rotate(context.Background(), "wag_01krdgeqcxet5s7t44vh8rt9mg")
if err != nil {
log.Fatal(err)
}
fmt.Println(link.InviteLink) // every earlier link has stopped working$link = $bird->whatsapp->groups->inviteLink->rotate('wag_01krdgeqcxet5s7t44vh8rt9mg');
echo $link->getInviteLink(); // every earlier link has stopped workingbird whatsapp groups invite-link rotate <group-id> --yescurl -X POST "https://us1.platform.bird.com/v1/whatsapp/groups/{group_id}/invite-link/rotate" \
-H "Authorization: Bearer $TOKEN"Reactie200
{
"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.
Parameters
group_id
string
ID of the group whose invite link is being replaced.
Response Payload
invite_link
string
verplicht
The group's one invite link. Every link the group had before this one stops working.
Gerelateerde bronnen
Ga verder met de documentatie, gidsen en voorbeelden voor dit onderwerp. De bronnen zijn in het Engels.
Begrijp het conceptShould I use a Bird SDK or call the API directly?Volg het leerpadBuild your first integrationImplementatiegidsSend your first email
Ontvang een implementatieoverzicht