ฉันใช้เวบอเมซอน 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 );
คำถามคือทำยังไงฉันถึงจะได้ส่งของสถานะของกลับไปเป็น endpoint ที่อยู่ url ขอ HTTP หรือ HTTP? เหมือนข้อความ sms ได้ส่งหรือล้มเหลวน่ะเหรอ? รู้บ้างมั้ย?