我正在使用amazon PHP SDK尝试发送sms,我正在使用以下代码:
<?php
require 'vendor/autoload.php';
$sdk = new Aws\Sns\SnsClient([
'region' => 'eu-west-1',
'version' => 'latest',
'credentials' => ['key' => 'xxx', 'secret' => 'xxx']
]);
$result = $sdk->publish([
'Message' => 'This is a test message.',
'PhoneNumber' => '+123456789',
'MessageAttributes' => ['AWS.SNS.SMS.SenderID' => [
'DataType' => 'String',
'StringValue' => 'testing sms'
]
]]);
print_r( $result );我的问题是,如何将传递状态返回到端点url、HTTPS或HTTP?比如短信已经送达或者失败了?有什么想法吗?
发布于 2021-11-24 23:05:13
目前,执行此操作的唯一方法是利用CloudWatch应用编程接口(例如https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogEvents.html)读取发送到日志组的日志
https://stackoverflow.com/questions/70087728
复制相似问题