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"Respons200
{
"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.
Parameter
group_id
string
ID of the group whose invite link is being replaced.
Payload Respons
invite_link
string
wajib
The group's one invite link. Every link the group had before this one stops working.
Sumber daya terkait
Lanjutkan dengan dokumentasi, panduan, dan contoh untuk topik ini. Sumber daya tersedia dalam bahasa Inggris.
Pahami konsepnyaShould I use a Bird SDK or call the API directly?Ikuti jalur pembelajaranBuild your first integrationPanduan implementasiSend your first email
Dapatkan ringkasan implementasi