PHP code example of xianzhe18 / php-chatwork-api

1. Go to this page and download the library: Download xianzhe18/php-chatwork-api 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/ */

    

xianzhe18 / php-chatwork-api example snippets


$ composer 

$user = $chatwork->me()->show();

// APIのレスポンスはすべてオブジェクトの形で取得できます
var_dump($user);

$members = $client->rooms()->members(123456/* roomidを指定します。*/);
var_dump($members);


$files = $client->rooms()->files($room_id)->detail($file_id);

$chatwork = \Xianzhe18\Chatwork\Chatwork::create("chatwork api token", "v2", array('Content-Type' => 'multipart/form-data'));

$file = $chatwork->rooms()->files($room_id)->create($file, $message);