PHP code example of dbh / api5client

1. Go to this page and download the library: Download dbh/api5client library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

dbh / api5client example snippets



$loginSessionApi = new LoginSessionApi();
// 请求接口域名地址
$loginSessionApi->setApiUri($devUri);
// clientId
$loginSessionApi->setClientId($clientId);
// clientSecret
$loginSessionApi->setClientSecret($clientSecret);
// 平台公钥 
$loginSessionApi->setSystemPublicKey($systemPublicKey);
// 用户私钥
$loginSessionApi->setUserPrivateKey($userPrivateKey);

// 登录校验码
$token = '';

$ret = $loginSessionApi->setAuthorization($token)->check();
var_dump($ret);

// 调用发送邮件接口
$ret = $emailApi->sendEmail('[email protected]', '通知', '123456');
var_dump($ret);