Amazon SNS Mobile Push - how to bulk subscribe endpoints to a topic? - ios

I am trying to move my existing iOS push notification infrastructure over to amazon SNS mobile push.
I exported all my tokens from my local db into an SNS application (using CSV). Now I want to send push notification to all my 10,000 users. I think the only way is to create a topic and subscribe all the users to that topic then publish message to that topic.
Is there any easy way to subscribe all the 10,000 users who I have imported into the system to a topic?
Thanks for any help!

It sounds like you have created the Amazon SNS Platform Application and imported your tokens as Amazon SNS Platform Endpoints.
What kind of notification are you sending?
If you send a custom message to each user, use Direct
Addressing. With this approach, you
Publish to each EndpointARN.
If you send the same message to all users, use topics. You need to subscribe your endpoints to a topic. When you are ready to send, Publish to the TopicARN. Amazon SNS will handle delivery to all endpoints subscribed to that topic. Amazon SNS currently does not provide a bulk subscribe API, so you will have to invoke Subscribe once per EndpointARN.
Full disclosure: I work for AWS on Amazon SNS.

Unfortunately there is no way so far... see Bulk push endpoints subscription to a topic on AWS Discussion Forum.
Hi there langelvicente,
Thanks for this feature request. I've passed this back through to the SNS Service Team for review.
Best regards,
Phil P

This is now possible with subscribing mobile endpoints to topics. The default subscriber limit was increased.
Q: Are there limits to the number of topics or number of subscribers
per topic?
By default, SNS offers 10 million subscriptions per topic, and 3,000
topics per account. To request a higher limit, please contact us at
at http://aws.amazon.com/support
http://aws.amazon.com/sns/faqs/?nc2=h_ls

If you have an application full of endpoints which you want to bulk subscribe to a SNS topic you can do so from the AWS SNS dashboard by:
Going to that application in SNS
Waiting until the 'total items' count at the bottom has completed its count (ie all items are listed)
Checking the select all check mark above the list of endpoints (screenshot attached)
Tap on platform action > subscribe endpoints to topic
Enter your topic ARN and click create subscription
The process will begin and it will stall your web browser but let it be as it takes time and if you want to see the subscriptions to the topic increasing you can use the AWS CLI with :
aws sns get-topic-attributes --topic-arn "[YOUR TOPIC ARN]"
note the "SubscriptionsConfirmed" value

Yes, but caveat: they each must accept your effort to enroll them into push messaging. That means that for each token in your database, each individual must consent to receiving future messages from you (via SMS and email, that is).
Each address (tel #, email) becomes an endpoint, and you can use SNS to create a topic, then subscribe each endpoint. After a confirmation email is sent to each endpoint (person on your list), they must confirm, in order to begin receiving your stream of messages via text or email.
Unfortunately, this confirmation/consent event is dicey, and must be handled correctly. Your ARN's title must be succinct (7 letter via SMS, no subject line allowed). Hence, you must contact them via SMS using a name they will recognize (the SMS message will arrive via short code, 304-something), and can be refused and/or blocked.
Not trivial! Best to investigate using push messages via mobile app. This will avoid the coveted SMS space, but you might consider putting out a blast to email and/or SMS, in order to get them using your mobile app. Apparently, given the immediacy of SMS, folks will be reading your first confirmation within 20 seconds. This could be a good thing, if they confirm, then accept your future messages.
Am doing this right now, and am preparing to be recognized by name using my initial blast -- apps that create anonymous SMS will be banned through iTunes!

Related

Send customized bulk SMS with twilio

I want to send different messages to multiple users at once. I read the article here: https://www.twilio.com/blog/send-bulk-sms-twilio-node-js-html but it mentions nothing about sending customized messages. The only difference in my messages is the user's name.
The best solution I can think of is to create x number of API calls to send messages to x numbers. I believe that's going to be time taking. Is it possible to do it with one API call?
Twilio developer evangelist, and author of that post, here.
You are right, there is not currently a Twilio service that allows you to send bulk messages with customised messages with one single API call. You will have to make an API call to the messages resource for each message you want to send.
When sending messages in bulk, I recommend you read and understand this article on Twilio rate limits and message queues. That will ensure you are successful in sending your messages.

How to receive contact name via Twilio WhatsApp

I am using the Twilio API for WhatsApp in a sandbox, for prototyping and testing. According to the Facebook / WhatsApp documentation, there are several types of inbound notifications that may be delivered to your unique Webhook.
Twilio API documentation is very limited and doesn’t mention any of the more advanced scenarios. For example retrieving the customers name, which should be present in every webhook request…
When I inspect the webhook, the body payload is very limited. Is there any way to receive the original channelData?
Apparently, this feature is not implemented yet. I received the following statement from Twilio.
Unfortunately we don't support the Contact name being included in the inbound Whatsapp message posted to your webhook at this time. I've raised a feature request for this with the Product Team in hopes that we'll have this feature available in the near future.
You can get the sender's name using the 'ProfileName' key from the request form.

Show system messages in conversation history using iOS Twilio SDK

Hi I have been working on one of my apps for integrating chat using Twilio SDK. I would want to know if it is possible to get the system message inside a channel for eg: 'Member A joined the channel', 'Member B left the channel', 'Member C accepted the invitation to join' and so on. It seems like Twilio SDK does not have API to get the system messages or to set them. How can we achieve this?
I also noticed that it can be achieved by setting the custom key-value pair in attributes inside the message and sending it to the channel. But for the newly invited members, they cannot send a message when they are declining the invitation request such as 'Member A declined the invitation to join channel', as they have not joined the channel yet.
Twilio developer evangelist here.
If you want to send persistent system level messages like this, you can do so with a combination of webhooks and the REST API.
The idea is that you can send messages to a channel using the REST API whenever you need one of these system messages. The default user for the REST API is the system and you can then treat messages from system as special for display in your UI.
I mention the webhooks because you can register to receive them for a number of useful events, like members joining and leaving channels. The webhooks may not cover all the things you want, like declining an invite, but for that I would just trigger my own HTTP request from the application to your server.
Let me know if that helps at all.

How to achieve twitter like push notification via AWS SNS?

Is there a way to achieve twitter like push notification via AWS SNS?
SNS send notification to the user when something is happen him or her?
As i know the best way is to create a topic per user.
When user relate event happened,we publish a notification to the topic.
As AWS described the max topic number is 100,000 per account currently.
What if i've 1,000,000 users, it will not work.
Is there a more scalable scheme?
beeth0ven,
SNS supports publishing to a Topic of subscribed device endpoints or direct publishing to individual endpoints. In your case, you'll want to implement direct publishing to each individual endpoint. This allows more control and personal engagement but also means that you'll need to manage those endpoints in your own database and associate each endpoint to a user of your mobile app. Instead of publishing to a TopicArn, you'll publish individual messages to a TargetArn, which is the SNS Platform Endpoint that represents an app and mobile device. TargetArn is also the same call to send an SMS message to an individual phone number.
SNS Publish CLI: (see --target-arn)
http://docs.aws.amazon.com/cli/latest/reference/sns/publish.html
Direct Publishing via the Console:
http://docs.aws.amazon.com/sns/latest/dg/mobile-push-send-directmobile.html

How does Non Admin get Slack Quota Details and slackbot to backup to gmail etc

Does anyone know where slack puts the usage information?
For example, how many messages have we used?
How close are we to the dreaded 10,000 message free limit for searching?
How does a particular user (non-admin) backup everything OR better yet automatically post everything to gmail or drive or something else that last longer than 10,000 messages?
You can see the amount of message on the statistics page. https://myslack.slack.com/admin/stats
Usually every Slack user has access to that page (can be restricted to admins only).
To backup your messages you could develop a bot that automatically transfers old messages to an external cloud service and deletes the transferred message in Slack. The Slack API provides the method chat.delete for deleting messages. This approach will also work for private channels if the user that authenticated the bot is a member of that private channel.
Please note that your Slack will continue to function perfectly even after you have reached the 10.000 messages limit, but it will only show the newest 10.000 messages. If you really need to keep all messages you may want to consider either moving up to a paid tier or using a different service.

Resources