http->request('POST', "{$this->url}/{$method}", [ 'form_params' => array_merge($params, [ 'access_token' => $this->token, 'v' => $this->version, ]), ]); $result = json_decode($response->getBody()->getContents(), true); if (isset($result['error'])) { throw new Exception("VK API Error: " . $result['error']['error_msg']); } return $result; } }