Closes a group.
Official documentation | https://api.slack.com/methods/groups.close |
Payload class |
GroupsClosePayload |
PayloadResponse class |
GroupsClosePayloadResponse |
$apiClient = new ApiClient('your-token-here');
$payload = new GroupsClosePayload();
$payload->setGroupId('G1234567');
$response = $apiClient->send($payload);
if ($response->isOk()) {
// group has been closed!
} else {
// something went wrong, but what?
// simple error (Slack's error message)
echo $response->getError();
// explained error (Slack's explanation of the error, according to the documentation)
echo $response->getErrorExplanation();
}