config->getToken())) { return $this->config->getToken(); } $query = [ 'grant_type' => 'client_credential', 'appid' => $this->config->getAppid(), 'secret' => $this->config->getAppsecret() ]; $this->request->setErrorField('errcode'); $this->request->setErrorMsgField('errmsg'); $param = $this->request->get($this->url, $query); if (!$param->isResultsOK()) { throw new \Exception($param->getMessage()); } return $param->getData(); } }