All URIs are relative to /api, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| addParticipant() | POST /instances/{instance_key}/groups/{group_id}/participants/add | Add participant. |
| createGroup() | POST /instances/{instance_key}/groups/create | Create group. |
| demoteParticipant() | PUT /instances/{instance_key}/groups/{group_id}/participants/demote | Demote participant. |
| getAdminGroups() | GET /instances/{instance_key}/groups/admin | Get admin groups. |
| getAllGroups() | GET /instances/{instance_key}/groups/ | Get all groups. |
| getAllParticipants() | GET /instances/{instance_key}/groups/{group_id}/participants | Get all participants. |
| getGroup() | GET /instances/{instance_key}/groups/{group_id} | Get group. |
| getGroupFromInviteLink() | GET /instances/{instance_key}/groups/invite-info | Get group from invite link. |
| getGroupInviteCode() | GET /instances/{instance_key}/groups/{group_id}/invite-code | Get group invite code. |
| joinGroupWithLink() | GET /instances/{instance_key}/groups/join | Join group with invite code. |
| leaveGroup() | DELETE /instances/{instance_key}/groups/{group_id}/ | Leaves the group. |
| promoteParticipant() | PUT /instances/{instance_key}/groups/{group_id}/participants/promote | Promote participant. |
| removeParticipant() | DELETE /instances/{instance_key}/groups/{group_id}/participants/remove | Remove participant. |
| setGroupAnnounce() | PUT /instances/{instance_key}/groups/{group_id}/announce | Set group announce. |
| setGroupDescription() | PUT /instances/{instance_key}/groups/{group_id}/description | Set group description. |
| setGroupLocked() | PUT /instances/{instance_key}/groups/{group_id}/lock | Set group locked. |
| setGroupName() | PUT /instances/{instance_key}/groups/{group_id}/name | Set group name. |
| setGroupPicture() | PUT /instances/{instance_key}/groups/{group_id}/profile-pic | Set group picture. |
addParticipant($instance_key, $group_id, $data): \WhatsAPI\models\APIResponseAdd participant.
Handles adding participants to a group. You must be admin in the group or the query will fail.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new WhatsAPI\Api\GroupManagementApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$instance_key = 'instance_key_example'; // string | Instance key
$group_id = 'group_id_example'; // string | Group id of the group
$data = new \WhatsAPI\models\GroupUpdateParticipantsPayload(); // \WhatsAPI\models\GroupUpdateParticipantsPayload | Group update payload
try {
$result = $apiInstance->addParticipant($instance_key, $group_id, $data);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GroupManagementApi->addParticipant: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| instance_key | string | Instance key | |
| group_id | string | Group id of the group | |
| data | \WhatsAPI\models\GroupUpdateParticipantsPayload | Group update payload |
- Content-Type:
application/json - Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to README]
createGroup($instance_key, $data): \WhatsAPI\models\APIResponseCreate group.
Creates a group with the participant data. The creator is automatically added to the group.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new WhatsAPI\Api\GroupManagementApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$instance_key = 'instance_key_example'; // string | Instance key
$data = new \WhatsAPI\models\GroupCreatePayload(); // \WhatsAPI\models\GroupCreatePayload | Group create payload
try {
$result = $apiInstance->createGroup($instance_key, $data);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GroupManagementApi->createGroup: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| instance_key | string | Instance key | |
| data | \WhatsAPI\models\GroupCreatePayload | Group create payload |
- Content-Type:
application/json - Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to README]
demoteParticipant($instance_key, $group_id, $data): \WhatsAPI\models\APIResponseDemote participant.
Demotes admins in groups. You must be admin in the group or the query will fail.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new WhatsAPI\Api\GroupManagementApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$instance_key = 'instance_key_example'; // string | Instance key
$group_id = 'group_id_example'; // string | Group id of the group
$data = new \WhatsAPI\models\GroupUpdateParticipantsPayload(); // \WhatsAPI\models\GroupUpdateParticipantsPayload | Group update payload
try {
$result = $apiInstance->demoteParticipant($instance_key, $group_id, $data);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GroupManagementApi->demoteParticipant: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| instance_key | string | Instance key | |
| group_id | string | Group id of the group | |
| data | \WhatsAPI\models\GroupUpdateParticipantsPayload | Group update payload |
- Content-Type:
application/json - Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getAdminGroups($instance_key): \WhatsAPI\models\APIResponseGet admin groups.
Returns list of all groups in which you are admin.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new WhatsAPI\Api\GroupManagementApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$instance_key = 'instance_key_example'; // string | Instance key
try {
$result = $apiInstance->getAdminGroups($instance_key);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GroupManagementApi->getAdminGroups: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| instance_key | string | Instance key |
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getAllGroups($instance_key, $include_participants): \WhatsAPI\models\APIResponseGet all groups.
Returns list of all groups with participants data. Set include_participants to false to exclude participants data.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new WhatsAPI\Api\GroupManagementApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$instance_key = 'instance_key_example'; // string | Instance key
$include_participants = 'true'; // string | Include participants data
try {
$result = $apiInstance->getAllGroups($instance_key, $include_participants);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GroupManagementApi->getAllGroups: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| instance_key | string | Instance key | |
| include_participants | string | Include participants data | [optional] [default to 'true'] |
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getAllParticipants($instance_key, $group_id): \WhatsAPI\models\APIResponseGet all participants.
Returns all participants of the group.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new WhatsAPI\Api\GroupManagementApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$instance_key = 'instance_key_example'; // string | Instance key
$group_id = 'group_id_example'; // string | Group id of the group
try {
$result = $apiInstance->getAllParticipants($instance_key, $group_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GroupManagementApi->getAllParticipants: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| instance_key | string | Instance key | |
| group_id | string | Group id of the group |
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getGroup($instance_key, $group_id): \WhatsAPI\models\APIResponseGet group.
Fetches the group data.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new WhatsAPI\Api\GroupManagementApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$instance_key = 'instance_key_example'; // string | Instance key
$group_id = 'group_id_example'; // string | Group id of the group
try {
$result = $apiInstance->getGroup($instance_key, $group_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GroupManagementApi->getGroup: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| instance_key | string | Instance key | |
| group_id | string | Group id of the group |
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getGroupFromInviteLink($instance_key, $invite_link): \WhatsAPI\models\APIResponseGet group from invite link.
Gets a group info from an invite link. An invite link is a link that can be used to join a group. It is usually in the format https://chat.whatsapp.com/{invitecode}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new WhatsAPI\Api\GroupManagementApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$instance_key = 'instance_key_example'; // string | Instance key
$invite_link = 'invite_link_example'; // string | The invite link to check
try {
$result = $apiInstance->getGroupFromInviteLink($instance_key, $invite_link);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GroupManagementApi->getGroupFromInviteLink: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| instance_key | string | Instance key | |
| invite_link | string | The invite link to check |
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getGroupInviteCode($instance_key, $group_id): \WhatsAPI\models\APIResponseGet group invite code.
Gets the invite code of the group.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new WhatsAPI\Api\GroupManagementApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$instance_key = 'instance_key_example'; // string | Instance key
$group_id = 'group_id_example'; // string | Group id of the group
try {
$result = $apiInstance->getGroupInviteCode($instance_key, $group_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GroupManagementApi->getGroupInviteCode: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| instance_key | string | Instance key | |
| group_id | string | Group id of the group |
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to README]
joinGroupWithLink($instance_key, $invite_code): \WhatsAPI\models\APIResponseJoin group with invite code.
Joins a group with group invite link. An invite link is a link that can be used to join a group. It is usually in the format https://chat.whatsapp.com/{invitecode} You have to put invite_code in the url of the request. The invite code is the part after https://chat.whatsapp.com/ For example, if the invite link is https://chat.whatsapp.com/dsfsf34r3d3dsds, then the invite code is `dsfsf34r3d3dsds“
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new WhatsAPI\Api\GroupManagementApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$instance_key = 'instance_key_example'; // string | Instance key
$invite_code = 'invite_code_example'; // string | The invite code of group you want to join
try {
$result = $apiInstance->joinGroupWithLink($instance_key, $invite_code);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GroupManagementApi->joinGroupWithLink: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| instance_key | string | Instance key | |
| invite_code | string | The invite code of group you want to join |
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to README]
leaveGroup($instance_key, $group_id): \WhatsAPI\models\APIResponseLeaves the group.
Leaves the specified group.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new WhatsAPI\Api\GroupManagementApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$instance_key = 'instance_key_example'; // string | Instance key
$group_id = 'group_id_example'; // string | Group id of the group
try {
$result = $apiInstance->leaveGroup($instance_key, $group_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GroupManagementApi->leaveGroup: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| instance_key | string | Instance key | |
| group_id | string | Group id of the group |
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to README]
promoteParticipant($instance_key, $group_id, $data): \WhatsAPI\models\APIResponsePromote participant.
Promotes participants to admin. You must be admin in the group or the query will fail.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new WhatsAPI\Api\GroupManagementApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$instance_key = 'instance_key_example'; // string | Instance key
$group_id = 'group_id_example'; // string | Group id of the group
$data = new \WhatsAPI\models\GroupUpdateParticipantsPayload(); // \WhatsAPI\models\GroupUpdateParticipantsPayload | Group update payload
try {
$result = $apiInstance->promoteParticipant($instance_key, $group_id, $data);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GroupManagementApi->promoteParticipant: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| instance_key | string | Instance key | |
| group_id | string | Group id of the group | |
| data | \WhatsAPI\models\GroupUpdateParticipantsPayload | Group update payload |
- Content-Type:
application/json - Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to README]
removeParticipant($instance_key, $group_id, $data): \WhatsAPI\models\APIResponseRemove participant.
Handles removing participants from a group. You must be admin in the group or the query will fail.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new WhatsAPI\Api\GroupManagementApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$instance_key = 'instance_key_example'; // string | Instance key
$group_id = 'group_id_example'; // string | Group id of the group
$data = new \WhatsAPI\models\GroupUpdateParticipantsPayload(); // \WhatsAPI\models\GroupUpdateParticipantsPayload | Group update payload
try {
$result = $apiInstance->removeParticipant($instance_key, $group_id, $data);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GroupManagementApi->removeParticipant: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| instance_key | string | Instance key | |
| group_id | string | Group id of the group | |
| data | \WhatsAPI\models\GroupUpdateParticipantsPayload | Group update payload |
- Content-Type:
application/json - Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to README]
setGroupAnnounce($instance_key, $announce, $group_id): \WhatsAPI\models\APIResponseSet group announce.
Set if non-admins are allowed to send messages in groups
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new WhatsAPI\Api\GroupManagementApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$instance_key = 'instance_key_example'; // string | Instance key
$announce = false; // bool | Announce status
$group_id = 'group_id_example'; // string | Group id of the group
try {
$result = $apiInstance->setGroupAnnounce($instance_key, $announce, $group_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GroupManagementApi->setGroupAnnounce: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| instance_key | string | Instance key | |
| announce | bool | Announce status | [default to false] |
| group_id | string | Group id of the group |
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to README]
setGroupDescription($instance_key, $group_id, $data): \WhatsAPI\models\APIResponseSet group description.
Changes the group description
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new WhatsAPI\Api\GroupManagementApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$instance_key = 'instance_key_example'; // string | Instance key
$group_id = 'group_id_example'; // string | Group id of the group
$data = new \WhatsAPI\models\GroupUpdateDescriptionPayload(); // \WhatsAPI\models\GroupUpdateDescriptionPayload | Group description data
try {
$result = $apiInstance->setGroupDescription($instance_key, $group_id, $data);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GroupManagementApi->setGroupDescription: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| instance_key | string | Instance key | |
| group_id | string | Group id of the group | |
| data | \WhatsAPI\models\GroupUpdateDescriptionPayload | Group description data |
- Content-Type:
application/json - Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to README]
setGroupLocked($instance_key, $locked, $group_id): \WhatsAPI\models\APIResponseSet group locked.
Set if non-admins are allowed to change the group dp and other stuff
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new WhatsAPI\Api\GroupManagementApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$instance_key = 'instance_key_example'; // string | Instance key
$locked = false; // bool | Locked status
$group_id = 'group_id_example'; // string | Group id of the group
try {
$result = $apiInstance->setGroupLocked($instance_key, $locked, $group_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GroupManagementApi->setGroupLocked: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| instance_key | string | Instance key | |
| locked | bool | Locked status | [default to false] |
| group_id | string | Group id of the group |
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to README]
setGroupName($instance_key, $group_id, $data): \WhatsAPI\models\APIResponseSet group name.
Changes the group name. The max limit is 22 chars
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new WhatsAPI\Api\GroupManagementApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$instance_key = 'instance_key_example'; // string | Instance key
$group_id = 'group_id_example'; // string | Group id of the group
$data = new \WhatsAPI\models\GroupUpdateNamePayload(); // \WhatsAPI\models\GroupUpdateNamePayload | Group name data
try {
$result = $apiInstance->setGroupName($instance_key, $group_id, $data);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GroupManagementApi->setGroupName: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| instance_key | string | Instance key | |
| group_id | string | Group id of the group | |
| data | \WhatsAPI\models\GroupUpdateNamePayload | Group name data |
- Content-Type:
application/json - Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to README]
setGroupPicture($instance_key, $group_id, $set_group_picture_request): \WhatsAPI\models\APIResponseSet group picture.
Changes the group profile picture. Currently it only seems to accept JPEG images only
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new WhatsAPI\Api\GroupManagementApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$instance_key = 'instance_key_example'; // string | Instance key
$group_id = 'group_id_example'; // string | Group id of the group
$set_group_picture_request = new \WhatsAPI\models\SetGroupPictureRequest(); // \WhatsAPI\models\SetGroupPictureRequest
try {
$result = $apiInstance->setGroupPicture($instance_key, $group_id, $set_group_picture_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GroupManagementApi->setGroupPicture: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| instance_key | string | Instance key | |
| group_id | string | Group id of the group | |
| set_group_picture_request | \WhatsAPI\models\SetGroupPictureRequest |
- Content-Type:
application/json - Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to README]