Skip to content
This repository has been archived by the owner on Dec 17, 2018. It is now read-only.

Latest commit

 

History

History
33 lines (23 loc) · 1.16 KB

groups-close.md

File metadata and controls

33 lines (23 loc) · 1.16 KB

groups.close

Closes a group.

Official documentation https://api.slack.com/methods/groups.close
Payload class GroupsClosePayload
PayloadResponse class GroupsClosePayloadResponse

Usage

$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();
}