PHP code example of jimchen / tim-sdk

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

    

jimchen / tim-sdk example snippets


use TimSDK;

$options = [
  'app_id'      => '14000xxxx',
  'identifier'  => 'admin',
  'key' => 'Your key',
  'http'        => [
	'timeout'  => 30,
  ],
];
$app = new TimSDK\Application($options);
$collect = $app->account->import('identifier', 'nickname', 'faceUrl');