2 Answers
- Newest
- Most votes
- Most comments
1
After further exploration, here's what I found-
Observations
- If not using pinpoint and the user's number is shown in the SNS opt-out list, messages sent via SNS publish message will not get delivered.
- Irrespective of whether using pinpoint or not, incoming SMS from the user always pass through SNS and are checked for the opt-out keywords like STOP, END, CANCEL, etc. (https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-sms-manage.html). If an opt-out keyword is found, the number is always added to the SNS opt-out list. (Further reading- https://docs.aws.amazon.com/sns/latest/dg/sms_manage.html)
- If the 'Self-managed opt-outs' option for the pinpoint long code is disabled and the user's number is shown in the SNS opt-out list,
3.1. A new pinpoint endpoint cannot be created for that number.
3.2. Messages sent via existing pinpoint endpoint for that number will not get delivered.
3.3. Messages sent via SNS publish message will not get delivered. - If the 'Self-managed opt-outs' option for the pinpoint long code is enabled and the user's number is shown in the SNS opt-out list,
4.1. The previous points 3.1. and 3.2. still hold true.
4.2. Messages sent via SNS publish message will get delivered because of the enabled 'Self-managed opt-outs' despite the number being added to SNS opt-out list.
Cause of the problem
In my case 'Self-managed opt-outs' option was disabled, which is why pinpoint endpoint opt-out status was irrelevant and SNS opt-out list was taking precedence.
Solution
- As can be seen above, keeping 'Self-managed opt-outs' disabled did not satisfy my requirements. So I enabled it.
- Pinpoint endpoints could not be used because the SNS opt-out list would always take precedence.
- Finally, I'm just using pinpoint for getting the long code with two-way SMS and 'Self-managed opt-outs' enabled. I'm using SNS publish message to send the messages instead of the pinpoint endpoint.
- Now that I'm using 'Self-managed opt-outs', one important thing to note here is- I'm maintaining the opt-out status for each user's number on my backend and handling the outgoing message delivery allow/deny at the middleware level.
answered 3 years ago
Relevant content
- asked a year ago
- asked a year ago
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 7 months ago
- How do I set up logging for Amazon Pinpoint voice messages for Amazon Pinpoint SMS and Voice v1 API?AWS OFFICIALUpdated 2 years ago
- How do I set up logging for Amazon Pinpoint voice messages for Amazon Pinpoint SMS and Voice v2 API?AWS OFFICIALUpdated a year ago