From bf7176eef01433b234297a9c11a39fd7a2eaa480 Mon Sep 17 00:00:00 2001 From: "Atsushi Yasui @ MBP1" Date: Thu, 21 Mar 2019 11:57:23 +0900 Subject: [PATCH] Update to Chatwork API --- src/Chatwork.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Chatwork.php b/src/Chatwork.php index 30410765..5468d048 100644 --- a/src/Chatwork.php +++ b/src/Chatwork.php @@ -70,7 +70,7 @@ public function sendMessage($params) $ch = null; try { $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, 'https://api.chatwork.com/v1/rooms/'.$roomId.'/messages'); + curl_setopt($ch, CURLOPT_URL, 'https://api.chatwork.com/v2/rooms/'.$roomId.'/messages'); curl_setopt($ch, CURLOPT_HTTPHEADER, ['X-ChatWorkToken: '.$this->token]); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($option, '', '&'));