Hello, I tested the SNS service to send SMS to france (my country) using the php api, it worked perfectly until I reach the limit.
Then I asked amazon to use the service in production, they switch my account from the sandbox to production, I've been able to send one sms and nor more.
When I try now I get a statusCode of 200 with a message ID but the message never arrives.
This is my code:
$SnSclient = new SnsClient([
'region' => 'eu-west-3',
'version' => 'latest',
'credentials' => [
'key' => '**********************',
'secret' => '*************************************',
],]);
$sms = "Simple test";
$phone = "+33123456789";
try
{
$result = $SnSclient->publish([
"MessageAttributes" => [
'AWS.SNS.SMS.SMSType' => [
'DataType' => 'String',
'StringValue' => 'Transactional'
]
],
'Message' => $sms,
'PhoneNumber' => $phone ]);
}
catch (AwsException $e)
{
print_r($e);
}
print_r($result);
The return is like that:
(
[data:Aws\Result:private] => Array
(
[MessageId] => 9d7489b2-3662-5b52-ad7c-d299afb0fcd4
[@metadata] => Array
(
[statusCode] => 200
[effectiveUri] => https://sns.eu-west-3.amazonaws.com
[headers] => Array
(
[x-amzn-requestid] => 2de95f01-356e-5303-9b85-042aacbc0485
[content-type] => text/xml
[content-length] => 294
[date] => Tue, 21 Jun 2022 10:04:01 GMT
)
[transferStats] => Array
(
[http] => Array
(
[0] => Array
(
)
)
)
)
)
[monitoringEvents:Aws\Result:private] => Array
(
)
)```
What can I check ?
Thanks