coimstark/mattermost

Php Wrapper to interact with Mattermost API https://api.mattermost.com/

Installs: 7

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 1

pkg:composer/coimstark/mattermost

1.3.0 2021-07-15 12:55 UTC

This package is auto-updated.

Last update: 2025-10-09 15:01:37 UTC


README

PHP wrapper for Mattermost Api

Installation

composer require coimstark/mattermost

Authentication

Authentication can be handled via username / password

$username = '';
$password = '';

$session = (new Session())
    ->fromLogin($username, $password);

Or it can be handled by using personal access tokens

$accessToken = '';

$session = (new Session())
    ->fromPersonalAccessToken($accessToken);

Now setup the client with the session you've just created:

$uri = ''; // Mattermost uri incl. port (f.e. https://mattermost.acme.com:443)
$client = new Client($session, $uri);

Examples

You can find examples for every single API request in examples

Teams
Users
Channels
Posts