Amazon SNS
First 100 SMS are free, additional messages to the US or any messages sent to non-US phone numbers are charged based on the pricing
https://aws.amazon.com/sns/sms-pricing/
-
Signup for amazon web services.
-
Login to your aws console.
-
From the top right corner, select region "US East (N. Virginia)us-east-1" irrespective of your location.
-
Search for service SNS or SMS notification service and select the service.
-
Go to topics and create a new topic. Provide any name. For this tutorial we are using the name "OTPService"
-
Navigate to Mobile -> Text messaging (SMS) , scroll down to "Text messaging preferences" & click on edit.
Select Default message type to Transactional(*) & save.
-
Your account is currently in "Sandbox" mode (Test mode ), you will need to "Add a phone number" where you want to receive OTP messages for testing. Once you complete all the remaining steps, you can "exit sandbox" mode and ask amazon to enable your account but for now, simply add your phone number and verify it.
-
From the top right corner, click on your profile name & select "My security Credentials"
-
Navigate to access management -> Users -> Create User
-
Set permissions to "Attach existing policies directly" & select "AmazonSNSFullAccess" policy. Click on next.
-
Skip "add tags". Click on next
-
Click on create user
-
Select newly created user
-
Navigate to "Security Credentials" and click on "Create access key"
-
Select "Third Party Service" and create key
-
Please note down your API keys, or download a csv file. You won't able to access them again.
-
Go to your wordpess dashboard -> OTP login settings -> Services & paste the API keys here.
-
Download the AWS SDK and upload it in the settings.
-
Save Settings.