composer require getstream/stream-phpActivity Feeds v3 is in beta — try it out!
Installation
Composer
GitHub repository: https://github.com/GetStream/getstream-php. Feel free to submit bug reports and feature requests.
The package is tested against these environments:
- PHP 7.4+
- PHP 8.0+
- PHP 8.1+
- PHP 8.2+
- PHP 8.3+
To create a client, you’ll need your API key and secret. Both of them can be found in your Stream Dashboard.
The SDK has support for all Stream’s producs: chat, video and feeds.
$clientis used for operations shared among all products (such as user management)$feedsClientis used for feed operations
<?php require_once 'vendor/autoload.php'; use GetStream\ClientBuilder; $this->client = (new ClientBuilder()) ->apiKey($this->apiKey) ->apiSecret($this->apiSecret) ->build(); $this->feedsClient = (new ClientBuilder()) ->apiKey($this->apiKey) ->apiSecret($this->apiSecret) ->buildFeedsClient(); // or $client = (new ClientBuilder()) ->apiKey($apiKey) ->apiSecret($apiSecret) ->build(); $feedsClient = (new ClientBuilder()) ->apiKey($apiKey) ->apiSecret($apiSecret) ->buildFeedsClient();