I have an AWS account ./ server. How can I send a text message in C# from a desktop app using AWS. I can't seem to find any examples or helpful docs.
thanks
AWS doesn't offer a general purpose SMS messaging platform. It's SNS product does allow SMS as one of the optional delivery methods, but its not useful in a lot of scenarios because it requires users devices to be 'subscribed' before getting text messages.
A better choice for a general purpose SMS messaging solution is going to be Twilio or Clickatel or other similar vendors - both of those can easily send general purpose/custom SMS messages to any cell phone (in countries they support), without the user previously subscribing to the service, using C# from a desktop app.
You need REST API hosted on your AWS EC2. Then you create desktop application that call http request to that service.
Related
I am developing an app like Dominoes. In which, I would like to send a Push notification to the Customer, when his/her Order is prepared.
I had been using OneSignal to do so (through sending notification to a particular player id), and now we would like to do it with AWS SNS Service, as we are using bunch of different AWS Services too.
We don't want any marketing/bulk push notifications, the SNS Service would do only one thing - send a particular message from the Restaurants' Mobile (using REST API), and it would reach the Customer's mobile.
With OneSignal, we used to give the PlayerID/UserID of the receiver. Does this method apply to AWS SNS too? Also, we could only work with HTTPS POST requests in our platform.
Any help is appreciated :)
Thanks!
I have an existing mobile app that can receive push notifications and I have an existing backend application that exposes an API for sending notifications to the app. The backend application uses Firebase Cloud Messaging (FCM), so it could be considered a wrapper around FCM. My backend application uses the Firebase Admin SDK to create messages and send them to Firebase. My customers hit an API exposed by my backend application (so, if we assume that the customer is using Postman, then the flow for sending a message is: Postman->My backend application->Firebase->Mobile app).
Until now I have been running my backend application on a local server, and it works fine. But now I need to deploy this on AWS. My question is: is it necessary to use Amazon SNS or not? I don't really need any additional functionality from AWS, I just want AWS to permit the required communication.
For example, I dont need to go to an AWS interface to enter the token to send messages to my phone. I already have an API exposed through my backend for sending messages. So, should I even bother to set up SNS?
I know that at a minimum I will have to make my firebase project google credentials available to my instance on AWS (in a file located at the path specified using GOOGLE_APPLICATION_CREDENTIALS). What other configuration steps would be needed? Thanks a lot.
After some investigation I found that it is not necessary to use Amazon SNS to achieve what I wanted to achieve.
I was able to deploy my server application (which uses Firebase Cloud Message) to AWS, and the messages arrive on the mobile phones without any problem.
I initialized my backend application using the steps described on the Google Firebase site: https://firebase.google.com/docs/admin/setup
I would like to send a verification code to a specific user (only one) via email or text message. I have successfully done so through Amazon SES but I have not attempted through Amazon SMS yet. I have found myself going down the rabbit hole of investigating AWS Pinpoint.
It seems to me Pinpoint is meant for mass user messaging (text/email) rather than one-of individual messaging. I'm hoping I gathered that correctly.
My question, is there an advantage/disadvantage of using Pinpoint over Amazon SES and SMS for my use case?
This may be addressed by the Pinpoint FAQ
Q: I already use Amazon SNS or Amazon SES. What do I gain by switching
to Amazon Pinpoint?
In typical Amazon SNS and Amazon SES use cases, you have to set up
your application to manage each message's audience, content, and
delivery schedule. These same features are built in to Amazon
Pinpoint. With Amazon Pinpoint, you can create message templates,
delivery schedules, highly-targeted segments, and full campaigns.
Pinpoint also appears to be able to push notifications to users through the users preferred contact mechanism. This means that you are not limited to SMS and you reach your users with activation codes through the means they want to be reached. It also allows two-way communication.
The Pinpoint homepage also says:
You can send direct messages—such as order confirmations, welcome
messages, and one-time passwords—using the console or the Amazon
Pinpoint REST API. You can also use the API to build custom
applications that deliver campaign and transactional messages across
multiple channels.
This suggest it is suitable for your uses, though it has additional mass-communication features you do not currently need.
In addition to above points mentioned by #Freiheit you can send and receive SMS messages through Amazon Pinpoint. This will help you to track user response and create surveys, reviews and quiz like scenarios.
Check this AWS Documentation link
I have a React Native application that works on iOS and Android and I am looking to integrate AWS SNS. I have some questions that I hope people with SNS experience could answer.
From my understanding, AWS SNS is merely a gateway for using GCM (Android) and APNS (iOS)
Is this correct?
If the above is correct, imagine that I have an Android-only app, what's the point of using AWS SNS when I could directly use GCM/Firebase? I can even use Firebase with iOS.
My app needs to allow a single User to send a notification to one or more Users.
Is there an RESTful API I can consume to achieve this?
Or would I need to set up API Gateway and use Lambda functions?
How do I automatically store tokens on SNS?
I read that I have to integrate AWS Cognito for this, or use a Proxy Server.
Edit:
I've managed to write a Node.js server that uses the aws-sdk to communicate with SNS.
Questions corresponding to their above question numbers
Still looking for answers
Still looking for answers
I've written a Node server, I suppose I could embed the aws-sdk code into my React Native app as it can use Node APIs
For question #4 - I used createPlatformEndpoint
I am no specialist but given you have not received an answer yet, I thought I would try to help
you can use AWS SNS to send messages via GCM, but it can do much more, since it's a pub-sub service: for example, if can be configured to receive email complaints from mails sent by AWS SES, and then you get either either a lambda function or a queue (SQS) to receive those actions emitted by SNS, allowing you to act on them
for an Android-app only I don't see a good reason to bother, and even if it was also on iOS, you could configure yourself the sending of push notifications with an if/else in your code. I could argue it's a matter of personal taste, whether you want more configuration in your code vs in the infra-structure (I know the limit can get blurry), but it seems so much easier to keep it in the code that I wouldn't believe a word I said
My app needs to allow a single User to send a notification to one or
more Users.
If it's a user writing to 1 to a few users, like in a messaging app, I would say it's easier to define (and maintain) the logic within your app and iterate over the group of recipients to send the push notifications.
If you're going to have a few people who are going to be followed by thousands of people and needs to write to them, you might have a case for using SNS Topics (each "popular user" can write - maybe via your own api - to an SNS topic to which the "followers" subscribed; keep in mind the max number of topics you can create), as SNS will take care of any scaling issue (it can take time and resources to send a push notification to your 1 million followers)
What you said if you're going to user SNS, otherwise sending a push notification via GCM/FCM is as simple as a POST request.
I am working on an Android and iOS app using Xamaring and I want to send push notifications via Amazon SNS.
But I don't know how it works exactly. In my case, the app is a kind of a chat, where there is a plenty of users sending messages to each other.
I wonder how to register automatically the device's token to the Amazon SNS.
Who register the token? The backend or the application side?
And how would I do that?
Note: I'm using NodeJS as backend.
Hopefully you've found it on your own, but the SNS documentation is pretty solid on this front. Work your way through all the docs before you begin. With a Node backend you'll be using the AWS JS library, which is also well documented.
Start here: AWS SNS Mobile Push
then read about token management