Skip to content

How do I use AWS End User Messaging to verify UK phone numbers or send SMS messages to UK phone numbers?

4 minute read
0

I want to use AWS End User Messaging to verify UK phone numbers or send SMS messages to UK phone numbers.

Resolution

Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshooting errors for the AWS CLI. Also, make sure that you're using the most recent AWS CLI version.

You must use an origination identity to send SMS messages to the UK. If your AWS account and AWS Region don't have a UK origination identity and you call with the SendTextMessage operation, then you might receive the following error:

"Conflict Occurred - Reason=NO_ORIGINATION_IDENTITIES_FOUND"

Check the status of your SMS account, and then follow the steps for whether you use SMS production or Sandbox.

SMS production

If your SMS account is already in production, then you must claim a supported origination identity to send SMS messages to the UK. You can claim a UK sender ID from the AWS End User Messaging console to send SMS messages to a UK phone number. For more information, see Request a sender ID in AWS End User Messaging SMS and United Kingdom sender ID registration process in AWS End User Messaging SMS.

Sandbox

If your SMS account is in the AWS End User Messaging SMS sandbox, then you must verify the phone numbers after you request a sender ID.

Note: When you use the AWS Management Console to verify phone numbers, the sender ID isn't specified in the request.

Use the AWS CLI command or API call to verify the phone numbers

Complete the following steps:

  1. Request a sender ID.
  2. Use the CreateVerifiedDestinationNumber API call to verify the phone numbers. Or, run the create-verified-destination-number AWS CLI command:
    aws pinpoint-sms-voice-v2 create-verified-destination-number --destination-phone-number PhoneNumber
    Note: Replace PhoneNumber with the E.164 formatted phone number to send the message to. The command returns the verified phone numbers VerifiedDestinationNumberId. You require this ID for the following steps.
  3. Use the SendDestinationNumberVerificationCode API call to create a new text message with a verification code. Then, send it to a verified destination phone number. Or, run the send-destination-number-verification-code AWS CLI command:
    aws pinpoint-sms-voice-v2 send-destination-number-verification-code --verified-destination-number-id PhoneNumberID --verification-channel TEXT --origination-identity SenderID ARN
    Note: Replace PhoneNumberID with the VerifiedDestinationNumberId that you received in step 2. Replace SenderID ARN with the ARN of your UK sender ID. You can specify the sender ID as the origination identity. The mobile device then receives an SMS message with a randomly generated code to use in step 4..
  4. Once you have the one-time password (OTP), use the VerifyDestinationNumber API call to verify the number. Or, run the verify-destination-number AWS CLI command:
    aws pinpoint-sms-voice-v2 verify-destination-number --verified-destination-number-id PhoneNumberID --verification-code verification-code-value
    Note: Replace verification-code-value with the verification code that you received in step 3. Replace PhoneNumberID with the VerifiedDestinationNumberId that you received in step 2.
  5. When the verified destination phone number is in the Active state, use the SendTextMessage API call to send SMS messages to the verified number.

Exit the SMS sandbox

To use the registered UK sender ID to send messages, request production access for your SMS account. When you move your account out of sandbox, you don't need to verify the phone numbers before you send an SMS.

To request production access or create a AWS Support request, see Moving from the AWS End User Messaging SMS MMS and Voice sandbox to production.

Related information

Add a destination phone number while in the AWS End User Messaging SMS sandbox

AWS OFFICIALUpdated 5 days ago