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, '', '&'));