PHP code example of sendbird / sendbird-platform-sdk-php

1. Go to this page and download the library: Download sendbird/sendbird-platform-sdk-php 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/ */

    

sendbird / sendbird-platform-sdk-php example snippets

  

 = \Sendbird\Configuration::getDefaultConfiguration();

$api_token = 'MASTER_API_TOKEN_FROM_DASHBOARD';
$config->setHost("API_REQUEST_URL_FROM_DASHBOARD");

$apiInstance = new Sendbird\Api\UserApi(
    new GuzzleHttp\Client(),
    $config
);

$list_users_params['api_token'] = $api_token;

try {
    $result = $apiInstance->listUsers($list_users_params);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling listUsers: ', $e->getMessage(), PHP_EOL;
}



json
{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/sendbird/sendbird-platform-sdk-php.git"
    }
  ],
  "