首先进入 控制台 > HIFIVE授权管理 获取 appId,serverCode。具体API调用示例详见API接口文档。
          // 控制台appId —— appKey, 控制台serverCode —— secret, 服务器地址 —— url
$profile = DefaultProfile::build($url, $appKey, $secret);
// 如果需要,设置用户身份识别token
// $profile = DefaultProfile::build($url, $appKey, $secret, $userToken);
// 初始化client
$this->client = new DefaultClient($profile);
$request = new HFBaseLoginRequest();
$request->clientId('hf2y7jk19a56qetq05')
        ->nickname('zealot')
        ->gender(GenderEnum::MALE)
        ->birthday('1594639058')
        ->location('30.779164,103.94547')
        ->education(EducationEnum::UNDERGRADUATE)
        ->isOrganization(true)
        ->favoriteSinger('周杰伦')
        ->favoriteGenre('1');
$this->client->getResponse($request);