I have a studio flow that receives chat messages (from Whatsapp) and forward the conversation to Flex.
I'm trying to send a SMS notification to a hard-coded number as this happen.
The issue is that the SMS is never sent and the Send Message widget fails with the following log:
Failure sending message: Chat service or channel parameter missing
I understand that it's probably because the flow has a Chat context and that the widget expects a Chat Service. But I want to send a SMS.
I tried to configure the Send Message widget like this:
SEND MESSAGE FROM and SEND MESSAGE TO set and all other config fields empty
SEND MESSAGE FROM and SEND MESSAGE TO and PROGRAMMABLE CHAT SERVICE with a Messaging Service ID (which doesn't really make sense but hey...)
Neither worked.
How can I send a SMS from a Chat flow in Studio?
I was just able to knock up a quick Studio Flow that receives messages from WhatsApp and sends out an SMS to a hard-coded number and it worked for me. The way I did it was to hard code both the Send message from and Send message to numbers in the Messaging & chat config section of the Send Message widget, like this:
In this case you must ensure that the Send message from number is a Twilio number that is able to send SMS messages.
Related
I am integrating Twilio SMS service where my users are able to send SMS messages to their clients. I would like to be able to link each reply with the sent SMS. In another word, is there any field in the Message Resource that could lead me to conclude whether the incoming message received is related to the outgoing message my user sent previously ? I need same behavior as Email send/reply functionalities.
Twilio developer evangelist here.
There is no way to do this I’m afraid, the SMS protocol has no information about users replying to a specific message. SMS is chronological, you can test this by opening your phone’s SMS app and trying to reply to the second to last message you received from someone. In SMS there’s no way to do that.
The best thing you can do is consider the messages chronologically, and assume that the reply is in response to the last message you sent to that number from the number you sent it from.
I suspect your are interested in this because you need to send notifications and get responses to those notifications and you realised you might need to send more than one notification to a user at a time but still get their responses. The best way to get around this is to use different numbers to send the different notification messages from, then when they reply you can tell which notification they were replying to by the number they sent the message to.
I'm building a simple slack bot and can currently send private messages as well as checking for the last 10 messages received within this one-to-one channel.
Is there a way of getting a POST notification to my webservice whenever the user replies, instead of having to poll and continuously check messages on that one-to-one channel?
Now you can make use of Slack events to receive notifications.
In the give use-case, 'Message' event can be used to capture message received and process accordingly.
https://api.slack.com/events/message
Bots generally work by connecting to the real-time messaging API, a WebSocket-based API that sends you events as they happen. Specifically, you should see a message event sent to you every time a message visible to your bot is sent.
To answer your question, there's no way to get an HTTP POST sent to you instead; you'll need to connect to the RTM API and listen for events that way.
I want to send and receive text messages without showing MFMessageViewController from my application. Could anybody tell me how is it possible?
Not Possible , Unless you use 3rd party api for send/received sms.
you have to use Web service and Apple Push Notification Service for send message to other user without using MFMessageComposeViewController
You can't do it without MFMessageComposeViewController. Apple won't allow to send SMS without user interaction.
I've alternate solution of this, out of scope of iOS. Use web service API. Create a web service at server side that send a message to specific number(s) that accept numbers as parameters with request.
At specific time interval (according to your requirement) send a web service call with number as request parameter.
Web server can do it. It can send message to any device.
I know How to use MFMessageComposeViewController to compose message and forward the SMS and I want to send SMS in background without displaying message composer view. so If I click on button SMS will send in background without prompting to user.
There are 3rd party API's like Twilio, nexmo and tropo but i am not getting how to implement with those API's.
There is any other way to send SMS in background?
Using the standard API's you can only send an SMS with user interaction.
You can't send SMS or e-mail without user interaction unless there is any server interaction. If you really want to send SMS in background, send the content and reciepients to your server in background and from the server side you can send SMS to your receipients.
I am writing a IM app on iOS, and not sure about how to ensure that the other side has received my message. Could anyone give me some suggestions or existing frameworks?
You can have the device that receives a message send data back that confirms the message has been received. Most likely each message would be assigned a unique id that the receiving device would send back so that it knows specifically which message was received.
I am not familiar with Pubnub but looking quickly at their SDK it looks like you can send messages both directions on a single channel, or else you could setup one channel for sending messages and one channel for confirming messages.