protocol = "https"; $config->regionId = "central"; return new Dingtalk($config); } //获取企业内部凭证 public function get_company_token(){ $client = self::createClient(); $getAccessTokenRequest = new GetAccessTokenRequest([ "appKey" => "dingekepwoyycxfbtyvg", "appSecret" => "EjM9WohvKHo3eNqZGGbQHhbjM80QzapdC_f_reYiOCyEFOtaG1qoG2KzEfpSoLWe" ]); $res = $client->getAccessToken($getAccessTokenRequest); return $res->body->accessToken; } }