Groups Client API
Generated client method reference for the groups namespace.
This page documents 22 schema-registry client methods in the groups namespace.
addParticipant
Add participant to group
Signature client.addParticipant(groupId: string, contactId: string): Promise<boolean>
Usage
const result = await client.addParticipant("447123456789-1445627445@g.us", "447123456789@c.us");Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<boolean> |
Resolves to boolean. A rejected Promise indicates input validation or dispatch failure.
In-process Client resolves to Promise<boolean>. The contract above is for the remote Node.js client; HTTP wraps that result in its data property.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId, contactId |
| Aliases | addGroupParticipant, groups.addParticipant |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/addParticipant | addParticipant | Active |
| Alias | PUT | /api/addGroupParticipant | addGroupParticipant | Active |
| Alias | PUT | /api/addParticipant | addParticipant | Active |
approveGroupJoinRequest
Approve group join request
Signature client.approveGroupJoinRequest(groupId: string, contactId: string): Promise<string \| boolean>
Usage
import { SocketClient } from '@open-wa/socket-client';
const client = await SocketClient.connect('http://localhost:8080', 'YOUR_API_KEY');
const result = await client.approveGroupJoinRequest({
groupId: "447123456789-1445627445@g.us",
contactId: "447123456789@c.us",
});Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<string | boolean> |
Resolves to string \| boolean. A rejected Promise indicates input validation or dispatch failure.
This method is not declared on the in-process Client facade. Use the remote Node.js client or HTTP API.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId, contactId |
| Aliases | groups.approveJoinRequest |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/approveJoinRequest | approveGroupJoinRequest | Active |
| Alias | PUT | /api/approveGroupJoinRequest | approveGroupJoinRequest | Active |
createGroup
Create new group
Signature client.createGroup(name: string, contacts: string[]): Promise<GroupCreationResult \| null>
Usage
const result = await client.createGroup("name", ["447123456789@c.us"]);Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<GroupCreationResult | null> |
| GroupCreationResult | View fields |
Resolves to GroupCreationResult \| null. A rejected Promise indicates input validation or dispatch failure.
In-process Client resolves to Promise<{ gid: GroupId } \| null>. The contract above is for the remote Node.js client; HTTP wraps that result in its data property.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | send |
| Functionality | both |
| Positional parameter order | name, contacts |
| Aliases | groups.create |
| Deprecated aliases | - |
| License | restricted |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/groups/create | createGroup | Active |
| Alias | POST | /api/createGroup | createGroup | Active |
demoteParticipant
Demote participant from admin
Signature client.demoteParticipant(groupId: string, contactId: string): Promise<boolean \| string>
Usage
const result = await client.demoteParticipant("447123456789-1445627445@g.us", "447123456789@c.us");Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<boolean | string> |
Resolves to boolean \| string. A rejected Promise indicates input validation or dispatch failure.
In-process Client resolves to Promise<boolean>. The contract above is for the remote Node.js client; HTTP wraps that result in its data property.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId, contactId |
| Aliases | demoteGroupParticipant, groups.demoteParticipant |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/demoteParticipant | demoteParticipant | Active |
| Alias | PUT | /api/demoteGroupParticipant | demoteGroupParticipant | Active |
| Alias | PUT | /api/demoteParticipant | demoteParticipant | Active |
getAllGroups
Get all groups
Signature client.getAllGroups(withNewMessagesOnly?: boolean): Promise<Chat[]>
Usage
import { SocketClient } from '@open-wa/socket-client';
const client = await SocketClient.connect('http://localhost:8080', 'YOUR_API_KEY');
const result = await client.getAllGroups();Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<Chat[]> |
| Chat | View fields |
Resolves to Chat[]. A rejected Promise indicates input validation or dispatch failure.
This method is not declared on the in-process Client facade. Use the remote Node.js client or HTTP API. Serialized chat returned by chat lookups and listings. Its id is an opaque ChatId; additional WhatsApp Web fields may be present.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | read |
| Functionality | both |
| Positional parameter order | withNewMessagesOnly |
| Aliases | groups.all, groups.getAll, groups.list, listGroups |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/groups/getAll | getAllGroups | Active |
| Alias | GET | /api/getAllGroups | getAllGroups | Active |
| Alias | GET | /api/groups/all | groups.all | Active |
| Alias | GET | /api/groups/list | groups.list | Active |
| Alias | GET | /api/listGroups | listGroups | Active |
getGroupAdmins
Get group admins
Signature client.getGroupAdmins(groupId: string): Promise<ContactId[]>
Usage
import { SocketClient } from '@open-wa/socket-client';
const client = await SocketClient.connect('http://localhost:8080', 'YOUR_API_KEY');
const result = await client.getGroupAdmins({
groupId: "447123456789-1445627445@g.us",
});Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<ContactId[]> |
| ContactId | View fields |
Resolves to ContactId[]. A rejected Promise indicates input validation or dispatch failure.
This method is not declared on the in-process Client facade. Use the remote Node.js client or HTTP API. Opaque WhatsApp contact identifier. Preserve the exact value returned by the API.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | read |
| Functionality | both |
| Positional parameter order | groupId |
| Aliases | groups.getAdmins |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/groups/getAdmins | getGroupAdmins | Active |
| Alias | GET | /api/getGroupAdmins | getGroupAdmins | Active |
getGroupInfo
Get group metadata
Signature client.getGroupInfo(groupId: string): Promise<GroupMetadata \| null>
Usage
const result = await client.getGroupInfo("447123456789-1445627445@g.us");Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<GroupMetadata | null> |
| GroupMetadata | View fields |
Resolves to GroupMetadata \| null. A rejected Promise indicates input validation or dispatch failure.
In-process Client resolves to Promise<GroupMetadata \| null>. The contract above is for the remote Node.js client; HTTP wraps that result in its data property.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | read |
| Functionality | both |
| Positional parameter order | groupId |
| Aliases | groups.getInfo |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/groups/getInfo | getGroupInfo | Active |
| Alias | GET | /api/getGroupInfo | getGroupInfo | Active |
getGroupInviteLink
Get group invite link
Signature client.getGroupInviteLink(groupId: string): Promise<string>
Usage
const result = await client.getGroupInviteLink("447123456789-1445627445@g.us");Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<string> |
Resolves to string. A rejected Promise indicates input validation or dispatch failure.
In-process Client resolves to Promise<string>. The contract above is for the remote Node.js client; HTTP wraps that result in its data property.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | read |
| Functionality | both |
| Positional parameter order | groupId |
| Aliases | groups.getInviteLink |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/groups/getInviteLink | getGroupInviteLink | Active |
| Alias | GET | /api/getGroupInviteLink | getGroupInviteLink | Active |
getGroupMembers
Retrieves members of a group
Signature client.getGroupMembers(groupId: string): Promise<Contact[]>
Usage
const result = await client.getGroupMembers("447123456789-1445627445@g.us");Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<Contact[]> |
| Contact | View fields |
Resolves to Contact[]. A rejected Promise indicates input validation or dispatch failure.
In-process Client resolves to Promise<ContactId[]>. The contract above is for the remote Node.js client; HTTP wraps that result in its data property.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | read |
| Functionality | both |
| Positional parameter order | groupId |
| Aliases | groups.getMembers |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/groups/getMembers | getGroupMembers | Active |
| Alias | GET | /api/getGroupMembers | getGroupMembers | Active |
getGroupMembersId
Get group member IDs
Signature client.getGroupMembersId(groupId: string): Promise<ContactId[]>
Usage
import { SocketClient } from '@open-wa/socket-client';
const client = await SocketClient.connect('http://localhost:8080', 'YOUR_API_KEY');
const result = await client.getGroupMembersId({
groupId: "447123456789-1445627445@g.us",
});Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<ContactId[]> |
| ContactId | View fields |
Resolves to ContactId[]. A rejected Promise indicates input validation or dispatch failure.
This method is not declared on the in-process Client facade. Use the remote Node.js client or HTTP API. Opaque WhatsApp contact identifier. Preserve the exact value returned by the API.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | read |
| Functionality | both |
| Positional parameter order | groupId |
| Aliases | getGroupMemberIds, groups.getMemberIds, groups.getMembersId |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/groups/getMemberIds | getGroupMembersId | Active |
| Alias | GET | /api/getGroupMemberIds | getGroupMemberIds | Active |
| Alias | GET | /api/getGroupMembersId | getGroupMembersId | Active |
| Alias | GET | /api/groups/getMembersId | groups.getMembersId | Active |
getKickedGroups
Get groups where kicked
Signature client.getKickedGroups(): Promise<GroupChatId[]>
Usage
import { SocketClient } from '@open-wa/socket-client';
const client = await SocketClient.connect('http://localhost:8080', 'YOUR_API_KEY');
const result = await client.getKickedGroups();Parameters
This method does not define input parameters.
Returns
| Prop | Value |
|---|---|
| Return type | Promise<GroupChatId[]> |
| GroupChatId | View fields |
Resolves to GroupChatId[]. A rejected Promise indicates input validation or dispatch failure.
This method is not declared on the in-process Client facade. Use the remote Node.js client or HTTP API. Opaque group conversation identifier returned by a group lookup or join method.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | read |
| Functionality | both |
| Positional parameter order | - |
| Aliases | groups.getKicked |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/groups/getKicked | getKickedGroups | Active |
| Alias | GET | /api/getKickedGroups | getKickedGroups | Active |
joinGroupViaLink
Join group via invite link
Signature client.joinGroupViaLink(link: string, returnChatObj?: boolean): Promise<GroupChatId \| boolean \| number \| Chat>
Usage
const result = await client.joinGroupViaLink("link");Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<GroupChatId | boolean | number | Chat> |
| Chat | View fields |
| GroupChatId | View fields |
Resolves to GroupChatId \| boolean \| number \| Chat. A rejected Promise indicates input validation or dispatch failure.
In-process Client resolves to Promise<GroupId \| boolean \| number>. The contract above is for the remote Node.js client; HTTP wraps that result in its data property.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | send |
| Functionality | both |
| Positional parameter order | link, returnChatObj |
| Aliases | groups.join, groups.joinViaLink, joinGroup |
| Deprecated aliases | - |
| License | restricted |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | POST | /api/groups/join | joinGroupViaLink | Active |
| Alias | POST | /api/groups/joinViaLink | groups.joinViaLink | Active |
| Alias | POST | /api/joinGroup | joinGroup | Active |
| Alias | POST | /api/joinGroupViaLink | joinGroupViaLink | Active |
leaveGroup
Leave a group
Signature client.leaveGroup(groupId: string): Promise<void>
Usage
const result = await client.leaveGroup("447123456789-1445627445@g.us");Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<void> |
Resolves to void. A rejected Promise indicates input validation or dispatch failure.
In-process Client resolves to Promise<boolean>. The contract above is for the remote Node.js client; HTTP wraps that result in its data property.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId |
| Aliases | groups.leave |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/leave | leaveGroup | Active |
| Alias | PUT | /api/leaveGroup | leaveGroup | Active |
promoteParticipant
Promote participant to admin
Signature client.promoteParticipant(groupId: string, contactId: string): Promise<boolean \| string>
Usage
const result = await client.promoteParticipant("447123456789-1445627445@g.us", "447123456789@c.us");Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<boolean | string> |
Resolves to boolean \| string. A rejected Promise indicates input validation or dispatch failure.
In-process Client resolves to Promise<boolean>. The contract above is for the remote Node.js client; HTTP wraps that result in its data property.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId, contactId |
| Aliases | groups.promoteParticipant, promoteGroupParticipant |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/promoteParticipant | promoteParticipant | Active |
| Alias | PUT | /api/promoteGroupParticipant | promoteGroupParticipant | Active |
| Alias | PUT | /api/promoteParticipant | promoteParticipant | Active |
rejectGroupJoinRequest
Reject group join request
Signature client.rejectGroupJoinRequest(groupId: string, contactId: string): Promise<string \| boolean>
Usage
import { SocketClient } from '@open-wa/socket-client';
const client = await SocketClient.connect('http://localhost:8080', 'YOUR_API_KEY');
const result = await client.rejectGroupJoinRequest({
groupId: "447123456789-1445627445@g.us",
contactId: "447123456789@c.us",
});Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<string | boolean> |
Resolves to string \| boolean. A rejected Promise indicates input validation or dispatch failure.
This method is not declared on the in-process Client facade. Use the remote Node.js client or HTTP API.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId, contactId |
| Aliases | groups.rejectJoinRequest |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/rejectJoinRequest | rejectGroupJoinRequest | Active |
| Alias | PUT | /api/rejectGroupJoinRequest | rejectGroupJoinRequest | Active |
removeParticipant
Remove participant from group
Signature client.removeParticipant(groupId: string, contactId: string): Promise<boolean>
Usage
const result = await client.removeParticipant("447123456789-1445627445@g.us", "447123456789@c.us");Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<boolean> |
Resolves to boolean. A rejected Promise indicates input validation or dispatch failure.
In-process Client resolves to Promise<boolean>. The contract above is for the remote Node.js client; HTTP wraps that result in its data property.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId, contactId |
| Aliases | groups.removeParticipant, removeGroupParticipant |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/removeParticipant | removeParticipant | Active |
| Alias | PUT | /api/removeGroupParticipant | removeGroupParticipant | Active |
| Alias | PUT | /api/removeParticipant | removeParticipant | Active |
revokeGroupInviteLink
Revoke group invite link
Signature client.revokeGroupInviteLink(groupId: string): Promise<string \| boolean>
Usage
const result = await client.revokeGroupInviteLink("447123456789-1445627445@g.us");Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<string | boolean> |
Resolves to string \| boolean. A rejected Promise indicates input validation or dispatch failure.
In-process Client resolves to Promise<string \| boolean>. The contract above is for the remote Node.js client; HTTP wraps that result in its data property.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId |
| Aliases | groups.revokeInviteLink |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/revokeInviteLink | revokeGroupInviteLink | Active |
| Alias | PUT | /api/revokeGroupInviteLink | revokeGroupInviteLink | Active |
setGroupDescription
Set group description
Signature client.setGroupDescription(groupId: string, description: string): Promise<boolean>
Usage
const result = await client.setGroupDescription("447123456789-1445627445@g.us", "description");Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<boolean> |
Resolves to boolean. A rejected Promise indicates input validation or dispatch failure.
In-process Client resolves to Promise<boolean>. The contract above is for the remote Node.js client; HTTP wraps that result in its data property.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId, description |
| Aliases | groups.setDescription |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/setDescription | setGroupDescription | Active |
| Alias | PUT | /api/setGroupDescription | setGroupDescription | Active |
setGroupEditToAdminsOnly
Restrict group editing to admins only
Signature client.setGroupEditToAdminsOnly(groupId: string, onlyAdmins: boolean): Promise<boolean>
Usage
import { SocketClient } from '@open-wa/socket-client';
const client = await SocketClient.connect('http://localhost:8080', 'YOUR_API_KEY');
const result = await client.setGroupEditToAdminsOnly({
groupId: "447123456789-1445627445@g.us",
onlyAdmins: true,
});Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<boolean> |
Resolves to boolean. A rejected Promise indicates input validation or dispatch failure.
This method is not declared on the in-process Client facade. Use the remote Node.js client or HTTP API.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId, onlyAdmins |
| Aliases | groups.setEditAdminsOnly, groups.setEditToAdminsOnly |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/setEditAdminsOnly | setGroupEditToAdminsOnly | Active |
| Alias | PUT | /api/groups/setEditToAdminsOnly | groups.setEditToAdminsOnly | Active |
| Alias | PUT | /api/setGroupEditToAdminsOnly | setGroupEditToAdminsOnly | Active |
setGroupIcon
Set group icon
Signature client.setGroupIcon(groupId: string, image: string): Promise<boolean>
Usage
const result = await client.setGroupIcon("447123456789-1445627445@g.us", "image");Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<boolean> |
Resolves to boolean. A rejected Promise indicates input validation or dispatch failure.
In-process Client resolves to Promise<boolean>. The contract above is for the remote Node.js client; HTTP wraps that result in its data property.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId, image |
| Aliases | groups.setIcon |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/setIcon | setGroupIcon | Active |
| Alias | PUT | /api/setGroupIcon | setGroupIcon | Active |
setGroupTitle
Set group title
Signature client.setGroupTitle(groupId: string, title: string): Promise<boolean>
Usage
const result = await client.setGroupTitle("447123456789-1445627445@g.us", "title");Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<boolean> |
Resolves to boolean. A rejected Promise indicates input validation or dispatch failure.
In-process Client resolves to Promise<boolean>. The contract above is for the remote Node.js client; HTTP wraps that result in its data property.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId, title |
| Aliases | groups.setTitle |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/setTitle | setGroupTitle | Active |
| Alias | PUT | /api/setGroupTitle | setGroupTitle | Active |
setGroupToAdminsOnly
Restrict group to admins only
Signature client.setGroupToAdminsOnly(groupId: string, onlyAdmins: boolean): Promise<boolean>
Usage
import { SocketClient } from '@open-wa/socket-client';
const client = await SocketClient.connect('http://localhost:8080', 'YOUR_API_KEY');
const result = await client.setGroupToAdminsOnly({
groupId: "447123456789-1445627445@g.us",
onlyAdmins: true,
});Parameters
Prop
Type
Returns
| Prop | Value |
|---|---|
| Return type | Promise<boolean> |
Resolves to boolean. A rejected Promise indicates input validation or dispatch failure.
This method is not declared on the in-process Client facade. Use the remote Node.js client or HTTP API.
Advanced method metadata
Overview
| Prop | Value |
|---|---|
| Namespace | groups |
| Action | update |
| Functionality | both |
| Positional parameter order | groupId, onlyAdmins |
| Aliases | groups.setAdminsOnly, groups.setToAdminsOnly |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/groups/setAdminsOnly | setGroupToAdminsOnly | Active |
| Alias | PUT | /api/groups/setToAdminsOnly | groups.setToAdminsOnly | Active |
| Alias | PUT | /api/setGroupToAdminsOnly | setGroupToAdminsOnly | Active |
Was this helpful?
Your answer includes the page path and docs version.
