Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php send sms for aws sns sdk 2

// update file: aws-sdk-php/src/Aws/Sdk/Resources/sns-2010-03-31.php

'Publish' => array(
    'parameters' => array(
        'PhoneNumber' => array( // new parameter
            'type' => 'string',
            'location' => 'aws.query',
        ),
    ),
),

// You just need to publish it and include the `PhoneNumber` parameter
$snsClientResult = $snsClient->publish([
    'Message' => 'YOUR_MESSAGE',
    'PhoneNumber' => 'PHONE_NUMBER',
    'MessageStructure' => 'SMS',
    'MessageAttributes' => [
        'AWS.SNS.SMS.SenderID' => [
            'DataType' => 'String',
            'StringValue' => 'SENDER_ID',
        ],
        'AWS.SNS.SMS.SMSType' => [
            'DataType' => 'String',
            'StringValue' => 'Promotional', // Transactional
        ]
    ]
]);

// Get the response
$snsClientResult['MessageId']
Comment

PREVIOUS NEXT
Code Example
Php :: how to disable laravel cors 
Php :: integracao de webservice no php usando soap 
Php :: To fetch the soft deleted user, you should use withTrashed 
Php :: php run python script with arguments json 
Php :: PHP Forms - Validate E-mail and URL 
Php :: php is_a 
Php :: laravel 8 remove public from url 
Php :: if gd is image 
Php :: How to add watermark in FPDF PHP - Parte 1 
Php :: Final class constants - PHP 8.1 
Php :: laravel belongsto with condition date 
Php :: how to include only post variable from another file php 
Php :: magento2 migration 
Php :: laravel compile blade 
Php :: returning two yajra datatable using single method on the sam view laravel 
Php :: presentar la respuesta del conteo de la tabla una tabla en php 
Php :: image_store 
Php :: sort names alphabetically php 
Php :: show limited words from the_content php 
Php :: hide in nova laravel 
Php :: Who developed Laravel? 
Php :: laravel dompdf barcode 
Php :: php oops 
Php :: Handling Email Verification Error for APIs 
Php :: php composer copy library to public vendor folder 
Php :: wp table with hostname setup 
Php :: <= in php 
Php :: examples of invalid php variables 
Php :: php how to use multi byte functions 
Php :: use scope in statamic template 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =