Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save torbentschechne/83a231a8832c8795955c35566c9b39a5 to your computer and use it in GitHub Desktop.
Save torbentschechne/83a231a8832c8795955c35566c9b39a5 to your computer and use it in GitHub Desktop.
AWS - SNS
$params = array(
'credentials' => array(
'key' => 'AKIAI*****',
'secret' => 'tbgFh*****',
),
'region' => 'eu-west-1', // < your aws from SNS Topic region
'version' => 'latest'
);
/** @var SnsClient $sns */
$sns = new SnsClient($params);
$msgattributes = [
'AWS.SNS.SMS.SenderID' => [
'DataType' => 'String',
'StringValue' => 'FP',
],
'AWS.SNS.SMS.SMSType' => [
'DataType' => 'String',
'StringValue' => 'Transactional',
]
];
$args = array(
"Message" => $fpSMSReminderText,
"PhoneNumber" => $fpPhone,
"MessageAttributes" => $msgattributes
);
$publish = $sns->publish($args);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment