hitslab / rocket-chat-sdk
PHP SDK for Rocket.Chat REST API
v0.2.1
2020-10-18 19:48 UTC
Requires
- ext-json: *
- doctrine/annotations: ^1.10
- guzzlehttp/guzzle: ^6.5
Requires (Dev)
- phpunit/phpunit: ^9
This package is auto-updated.
Last update: 2025-03-19 05:51:48 UTC
README
Documentation for Rocket.Chat REST API available here - Rocket.Chat API
Install
composer require hitslab/rocket-chat-sdk
Example
use Hitslab\RocketChatSDK\RocketChatClient; use Hitslab\RocketChatSDK\Request\Authentication\LoginRequest; use Hitslab\RocketChatSDK\Request\Users\UsersListRequest; // Creating client $client = new RocketChatClient("https://rocket.my-company.org"); // Auth with login (or email) and password $loginResponse = LoginRequest::create($client) ->user('username') ->password('password') ->request(); // Get list of users $users = UsersListRequest::create($client) ->auth($loginResponse->data->authToken, $loginResponse->data->userId) ->request();