3

As part of some testing that I was doing, I replied STOP to an SMS message that was sent via Amazon's Pinpoint service. I received the acknowledgement that I had been removed from further notifications.

I want to opt back in to receiving those messages, but I can't figure out how to do that. I looked at the Pinpoint documentation and I did not see a way to do it. I looked in the Amazon Pinpoint Console and I did not see a way to remove a number from the blacklist. I have tried the standard terms that other SMS providers use such as UNSTOP, UNBLOCK, and START, but none of those work either. Does anyone have any suggestions. I do not want to contact Amazon support about this unless I have to.

Itsme2003
  • 141
  • 8

4 Answers4

5

As described here: https://docs.aws.amazon.com/cli/latest/reference/sns/opt-in-phone-number.html

aws sns opt-in-phone-number  --phone-number ###-###-####
TylerH
  • 20,799
  • 66
  • 75
  • 101
3

You can also use AWS Console -> Amazon SNS -> Mobile -> Text Messaging(SMS) section to see a list of opt-out phone numbers that was done through Pinpoint and choose to opt-in these numbers...

Lei Shi
  • 101
  • 4
1

AWS Pinpoint has not come up with the APIs to check if the number is opted out or not. You can use the AWS SNS APIs for checking this as well for marking a mobile number as active again.

1

I've been trying to figure this out as well and I think I have a solution from a set of documentation I found about setting up Pinpoint. Below is python pseudocode; from my understanding we just have to update the "OptOut" status for the endpoint (i.e. the phone number that originally opted out).

# Python pseudo code with comments
import boto 3
import datetime 

pinpoint = boto3.Session(**login_kwargs).client("pinpoint")

opt_in_response = pinpoint.update_endpoint(
    ApplicationId="<App ID from your project>",
    EndpointId="<Endpoint you are updating>", # Same as your phone number?
    EndpointRequest={
        "Address": "<Phone you are updating>",
        "ChannelType": 'SMS',
        "OptOut": "NONE", # Change from "ALL" (which is opt-out) to "NONE", opt-in
        "EffectiveDate": datetime.datetime.utcnow().isoformat(),
        "Attributes": {
            "OptInTimestamp": [datetime.datetime.utcnow().isoformat()]
        }
    }
)

I attempted to follow this documentation https://docs.aws.amazon.com/pinpoint/latest/developerguide/pinpoint-dg.pdf (the relevant stuff starts on page 92), which happens to not be in Python.

I wasn't successful but I'm pretty sure this is how you should be able to opt back in (if anyone who knows node.js can verify this solution that'd be awesome).

bibsian
  • 21
  • 3