public static function hwySms($tel, $code)
{
$url = "https://smsapi.cn-north-4.myhuaweicloud.com:443/sms/batchSendSms/v1"; //APP接入地址(在控制台"应用管理"页面获取)+接口访问URI
$APP_KEY = CfgService::getVal('huaweiyun_sms_accesskey'); //APP_Key
$APP_SECRET = CfgService::getVal('huaweiyun_sms_accesskeysercet'); //APP_Secret
$sender = '***'; //国内短信签名通道号或国际/港澳台短信通道号
$TEMPLATE_ID = CfgService::getVal('huaweiyun_sms_code');//模板ID
$signature = "华为云短信测试"; //签名名称
$client = new Client();
try {
$response = $client->request('POST', $url, [
'form_params' => [
'from' => $sender,
'to' => $tel,
'templateId' => $TEMPLATE_ID,
'templateParas' => "[\""
华为云短信验证码
最新推荐文章于 2025-05-06 11:00:19 发布