admin管理员组文章数量:1310193
When I use AWS php SDK for pinpoint sms api sometimes it's getting sms from a number other than AWS not that the same content that I have given. and I think it's not from AWS , how to solve this and anyone had the same experience ?
Once I tried to change the AWS keys but still same , so where will be the issue,
this is my code
public function handle()
{
$region = config('aws_default_region');
$key = config('aws_sms_access_key_id');
$secret = config('aws_sms_secret_access_key');
$projectId = config('aws_sms_project_id');
$credentials = [
'key' => $key,
'secret' => $secret,
];
$client = new PinpointClient([
'version' => 'latest',
'region' => $region,
'credentials' => $credentials,
]);
$configuation = [
'SMSMessage' => [
'Body' => $this->message,
'MessageType' => 'TRANSACTIONAL',
'SenderId' => 'TESTID'
],
];
// Specify the parameters for sending the SMS message
$params = [
'ApplicationId' => $projectId,
'MessageRequest' => [
'Addresses' => [
$this->contactNumber => [
'ChannelType' => 'SMS',
],
],
'MessageConfiguration' => $configuation,
],
];
try {
$result = $client->sendMessages($params);
} catch (AwsException $e) {
Log::error('AWS Pinpoint Error:', ['error' => $e->getMessage()]);
}
}
本文标签: aws php sdkAWS php SDK issue while using for Pinpoint t smsStack Overflow
版权声明:本文标题:aws php sdk - AWS php SDK issue while using for Pinpoint t sms - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741844013a2400675.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论