123456789101112131415161718192021222324252627282930 |
- <?php
- use AlibabaCloud\Client\AlibabaCloud;
- use AlibabaCloud\Client\Exception\ClientException;
- use AlibabaCloud\Client\Exception\ServerException;
- use AlibabaCloud\SDK\Cloudauth\V20190307\Cloudauth;
- // Download:https://github.com/aliyun/openapi-sdk-php
- // Usage:https://github.com/aliyun/openapi-sdk-php
- AlibabaCloud::accessKeyClient('LTAI5tAVV4VEU4vFVqpune1Q', 'IMRENgb7kQsjLXfJ33aCyeTLeNj9DH')
- ->regionId('cn-hangzhou')
- ->asDefaultClient()->options([]);
- try {
- $request = Cloudauth::v20190307()->initFaceVerify();
- $result = $request
- ->debug(true) // Enable the debug will output detailed information
- ->request();
- print_r($result->toArray());
- } catch (ClientException $exception) {
- echo $exception->getMessage() . PHP_EOL;
- } catch (ServerException $exception) {
- echo $exception->getMessage() . PHP_EOL;
- echo $exception->getErrorCode() . PHP_EOL;
- echo $exception->getRequestId() . PHP_EOL;
- echo $exception->getErrorMessage() . PHP_EOL;
- }
|