PHP code example of fiyo / mattermost
1. Go to this page and download the library: Download fiyo/mattermost 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/ */
fiyo / mattermost example snippets
$username = '';
$password = '';
$session = (new Session())
->fromLogin($username, $password);
$accessToken = '';
$session = (new Session())
->fromPersonalAccessToken($accessToken);
$uri = ''; // Mattermost uri incl. port (f.e. https://mattermost.acme.com:443)
$client = new Client($session, $uri);