PHP code example of halnique / php-slack-api

1. Go to this page and download the library: Download halnique/php-slack-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

halnique / php-slack-api example snippets


use Halnique\Slack;

$client = Slack\WebAPI\Client::create();
$apiTestResult = $client->call(Slack\WebAPI\Endpoints\HttpMethod::get(), 'api.test');
$authTestResult = $client->call(Slack\WebAPI\Endpoints\HttpMethod::post(), 'auth.test');
$usersLookupByEmailResult = $client->call(Slack\WebAPI\Endpoints\HttpMethod::get(), 'users.lookupByEmail', [
    'email' => '[email protected]',
]);
bash
$ composer