I want to write a Rest API to Send SMS, Receive SMS, Get Notification, Subscribe SMS Notification and Un Subscribe SMS Notification using WSO2 ESB 4.8 or new version.
I checked WSO2-ESB-Sending SMS block, It contain only sending SMS, but not Receive SMS, Get Notification, Subscribe SMS Notification and Un Subscribe SMS Notification.
Also can someone guide me how to implement the rest of the part (E.g SendSMS is void method in axis2-transport-sms-1.0.0.jar, Its mean we wont get the response after calling SendSMS method. So how can check the response status?
Thanks
Related
Im using AWS Lambda for sending emails by Amazon SES.
Each time that the request send_email succeeds I got the message id like confirmation.
But now, I want to use somehow this messageId. For example to know if this message concretelly get delivered or bounced.
CloudWatch offers me metrics, with the number of delivered or bounced messages but I want to look throught each one.
¿Is there any statement that allows to know the state of a message by id?
Due to the asynchronous nature of SMTP and how mails are being routed, you can't have this information immediately when sending an e-mail (via SES or otherwise).
However, AWS provides a feedback system which notifies an SNS topic when a message is delivered, bounced, or a complaint was received.
While the documentation is very detailed, the general idea is that you subscribe your own lambda(s) to the configured SNS topic(s) and you can then handle these events as you see fit (i.e. persist data on DynamoDB, call your unsubscribe API and so on).
Let say I have 100 people who subscribed to a topic called :"remeinde_me_my_appointment" and I have lambda function that gives me a list of 5 people with their endpoints who should be reminded about their appointments tomorrow.
Now my question is, how does the communication between lambda and SNS should work?
All I want to do is to send 5 messages to 5 people who signed up to receive notifications and well I've magically got all their endpoints.
Am I sending them back to the topic again?! what do I do form here I'm confused? It looks like I've defined my own topic and subscription already but what's next?
This is not a good use-case for subscribing to an Amazon SNS topic.
When a message is sent to an SNS topic, all recipients receive the message. You can also use Amazon SNS Message Filtering to limit which subscribers receive a message, based on a message attribute.
However, based on your use-case, this is not a good way to send your messages. Your use-case would probably be better handled by sending individual messages to each person with customized information about their appointment, such as:
Dear Joe, this is a reminder of your appointment with Dr Smith at 10am tomorrow.
So, instead of sending a message to a Topic, use the Amazon SNS publish() command with an Endpoint ARN:
sns.publish(TargetArn=user_endpoint_arn, Message=msg)
To use the Publish action for sending a message to a mobile endpoint, such as an app on a Kindle device or mobile phone, you must specify the EndpointArn for the TargetArn parameter. The EndpointArn is returned when making a call with the CreatePlatformEndpoint action.
This is good for sending a message to a mobile application.
If, instead, you are merely sending an SMS message, then you can publish directly to the mobile number:
sns.publish(PhoneNumber='+16025551234', Message=msg)
We are using Amazon SNS to sent SMS to customers through API(PHP). The topic may have email subscriptions as well as SMS subscriptions. I.e While creating a subscription,protocol may be email/sms. But we want to sent only SMS while publishing the messages. Email subscriptions should not receive any message. How to archive this?
This is not possible. All subscribers to the topic will be sent the message.
You can provide different versions of messages for different types of subscriptions (eg SMS vs email), but you cannot control which type of subscriber receives a message.
Some alternatives:
Maintain separate topics for situations where you wish to send a notification only to a subset of subscribers
Use Amazon Pinpoint to specifically target mobile users with notification campaigns
Can we send a SMS to a mobile number through amazon service? I need to send a plain message and not notifications.
No.
Amazon Simple Notification Service (SNS) can't send SMS messages to recipients who have not opted-in to receive topic notifications.
The SMS capability in SNS is limited to users who respond affirmatively to the initial message requesting that they confirm their subscription to a topic -- for notifications.
I'd like to understand how amazon SNS confirms endpoint subscription in case of mobile apps.
For SMS, HTTP or email enpoints, we can assume a confirmation SMS, call and email is sent.
But for apps, SNS seems to be managing all notifications through third party services like GCM, APNS etc.
Say I have a GCM client and server ready.
My client wants to subscribe to a topic. How is the confirmation message sent to the device?
Amazon SNS auto-confirms mobile endpoints like GCM, APNs etc. From the Amazon SNS FAQ,
Q: Does enabling push notifications require any special confirmations
with SNS Mobile Push?
No, they do not. End-users opt-in to receive push notifications when
they first run an app, whether or not SNS delivers the push
notifications.