public function createBasecampTodo($bucketId, $bcTodoListId, $todoData, $userAgentEmail) { $options = []; $options['json'] = $todoData; $this->uri = 'https://3.basecampapi.com/3140673/buckets/' . $bucketId . '/todolists/' . $bcTodoListId . '/todos.json'; $this->_client = new Client([ 'base_uri' => $this->baseUri ]); $options['headers'] = [ 'User-Agent' => $userAgentEmail, "Authorization" => "Bearer " . $this->getAccessToken(), ]; try { $this->response = $this->_client->post( $this->uri, $options ); } catch (ClientException $e) { dd($e); }