Sending/Receiving multi-recipient SMS - Twilio API - sms

I am writing an app that will facilitate the sending and receiving of SMS messages via a web application. I would like to allow for multiple recipients (not bulk, just a few recipients at most).
I understand that in order to send to multiple recipients, I have to make multiple API calls, and that is fine. The problem I am having is receiving text messages via the Webhook callback. If the SMS was sent to multiple recipients, I cannot see the other recipients in the callback, just myself as the recipient.
Because of this, I have no idea whether this message was intended for just me, or for other recipients as well. This is a problem, because I would like to show threaded conversations similar to Google hangouts, or the SMS applications on all Andorid and iPhones.
I cannot figure out a way to track conversations, if I can't tell if a received message was sent to just me, or a group of recipients. Any suggestions? I do not yes use Twilio on a production server, so if this is not possible to do using Twilio, but is possible using another service, that would be an option for me as well.

Twilio developer evangelist here.
Twilio doesn't fully support group messaging the way that you are used to it when using a phone. That actually relies on MMS under the hood to keep the members of the group chat synced up.
Where you make multiple API calls to send messages to each user, that is manifested as just a single message with no group attached. Thus, any reply to that message comes solely from that person you sent the message to. There is no group at all at this point.
The link that Alex shared in the comments is the closest way you can get group messaging to work. It relies on everyone messaging one Twilio number and the application behind it fanning the messages out to all the recipients. The blog post also comes with some handy subscribe/unsubscribe administration for the group.

Related

How do I notify users on Slack that aren't in the channel?

What we are trying to do
I am working on automation which posts messages to a Slack channel using Incoming Webhooks on a custom Slack App. The messages mentions people.
What works
We can send a message just fine, it has formatted content, and usernames are correctly resolved using the link-names flag.
What isn't working
The whole point of the notification is to inform a dynamic set of people about something they should care about. The set of people we tag varies hugely (think people who contributed to a pull request) and so not all possible recipients are in the channel these automated messages go to.
We assumed that given the usernames are being directly #-mentioned, they would be notified by Slack. However, two of the users we've tested with and #-mentioned confirm they never received a notification they had been tagged.
This is different to "human" behaviour, where if you #-mention someone in Slack, you get a little message reminding you that person isn't in this channel and offers to invite them or let them know.
As far as we can tell, sending the message programmatically is doing the equivalent of "Do nothing" in the picture above. I want to do either of the other two options, preferably "Let them know".
How can I notify people they've been mentioned? I've looked at all the API documentation and nothing discusses notifying users who aren't in the channel that they are mentioned.
This can't be an uncommon issue.... right?
Notes:
We aren't directly calling chat.postMessage, it's just the only documentation on link_names I could find to link to. We are using Incoming Webhooks, which has minimal documentation on the parameters - it seems to be the same as chat.postMessage.
We would prefer not to move off Incoming Webhooks, but we can do a custom integration with the API if we have to.
You need to invite the user to the channel first, using the Python client that's:
client.channels_invite(
channel=channel_id,
user=user_id
)

Is it posible to send multiple message to Google Home through DialogFlow?

On facebook Chatbot or others platform we can send message directly to the user.
So for one question we can send multiple answer.
Now, that i'm developing for Google Home, I need to do the same.
I didn't find this opttion.
Dialogflow HTTP call to my server is the only output available.
So is there anything i missed to send message back to user in case I have a multiple messages answer?
(Or do I have to bufferise very message my hook creates before sending it back?)
Thanks
The conversation model for the Google Assistant is different - you can only send a message to the user in response to the user sending you a message. You can only send a single response, but it may have multiple parts (up to two Simple responses, containing messages, plus other features such as cards and carousels).
If you need to send multiple things back - you may need to rethink how you're doing it or how much you're sending back at a time. The Assistant is primarily for audible responses, and a long audible response is generally not a good UX.

Automated/Bot message posting to Microsoft-Teams chat room

How can I automatically post messages to chat rooms in Microsoft-Teams? This is for one-way messaging: i.e. posting messages, not reading messages.
The big picture here is we are evaluating different Group Chat solutions, and one requirement is to post error messages to chat rooms from various services & programs.
A sensible approach seems to be to build a Bot using the REST API however just the authentication seems crazy complex, even then I can't work out how to just post a message. We're looking for a general solution that can be used simply in different scripting languages (Perl, Python, shell scripts, etc), so we don't want to use the .NET SDK or Node.js SDK.
We've already looked at Slack and Cisco Spark. Posting messages in both of these is super simple, so I'm hoping there's a similarly simple solution for Microsoft-Teams?!
For example:
In Slack you can use incoming webhooks to post messages. You use the web interface to get a unique webhook URL for each chat room, and then do simple HTTP POST to that URL (with a JSON message payload) to post to that chat room as the Bot. I had it working in 10 minutes.
In Cisco Spark you create a Bot which gives you a unique Access Token. You then get a room_id for the chat room and use those together to do an HTTP POST (again with a JSON payload) to create a message in the chat room.
So how do you programmatically post/create/send messages to a chat room in Microsoft-Teams?
The simplest way to do what you want is to post a message to a channel using an "Incoming Webhook" connector. For more information, see here: https://msdn.microsoft.com/en-us/microsoft-teams/connectors?f=255&MSPPError=-2147217396#setting-up-a-custom-incoming-webhook
What you're describing is precisely how the Office 365 Connectors work. A Connector allows you to post messages into a Group or Team using web-hooks and a simple JSON payload.
There is a playground for playing with these that is super helpful. One note however, there is a bug in the playground's webhook implementation, so for testing purposes, I would stick to the Send via Email option. This doesn't affect how these work in production, the bug is isolated to the Playground app itself.

Looking for clarifications on how to build a group chat app using Sinch platform

I am trying to figure out how to use sinch to build a basic group messaging app. It looks pretty simple but I have a few questions to help me understand the platform:
1) It seems like the platform doesn't support multiple conversations for one user. For example facebook messenger allows you to have many conversations with different people (different chats). But sinch only lets you send a message to a user with no conversation meta data. Or is it possible to send your message with meta data?
2)Do you manage users on the sinch platform? This means creating user objects and giving them id's etc or must this be done on another platform like parse?
3)How do you handle messaging logs? Like if I send a message to someone that's not logged in- how do I save it and also send them a push notification that a message was sent?
Thanks for the help everyone- the documentation is a bit dilute so I haven't been able to find answers to these questions yet :/.
You can send meta data with headers, to create your own meta data thing. But to be fair Sinch is more like multi recipient message than groups with channels.
No, we use delegated security
We will automatically deliver the message when the user logs on, we keep messages for 30 days for delivery.

Sending confirmation SMS automatically

I hope this gets a response.
Say Person A sends an SMS to a shortcode in a certain syntax. How could a confirmation SMS be sent to Person A's mobile phone automatically ("Your message has been received successfully!"), after determining that the SMS received from Person A is in the correct syntax? I'm a total newbie when it comes to SMS - so if anyone could describe the entire end-to-end process/architecture that could make this happen, I'd be grateful!
You'd have to find a gateway provider who handles the receiving and the sending of messages for you using a defined API talking to a script/application in the language of your choice.
You usually receive messages on a number defined by the gateway provider. Incoming messages will trigger a call to a URL defined by you. Behind that URL will usually be a script that then performs the desired actions (e.g. parsing the message and sending an automated response SMS through the gateway provider.)
SO questions related to SMS Gateways:
Sending an SMS myself
SMS from web application
BulkSMS provides facilities for you to both send mobile terminating (MT) messages and handle receipt of mobile originating (MO) messages.
You can request a short code, which your users then send MOs to. The message can then be relayed, via a simple HTTP request, to your web server. You application then determines a suitable response and replies via SMS by calling the MT API of BulkSMS.
There may be restrictions and legislation applicable, depending on where you are, where your users are and the networks the messages are passing through. They can provide assistance here too.
International incoming numbers http://www.bulksms.com/int/w/solutions_incoming.htm
Receiving messages via HTTP http://www.bulksms.com/int/docs/eapi/reception/http_push/
Sending API http://www.bulksms.com/int/docs/eapi/
Short codes in South Africa http://bulksms.2way.co.za/w/solutions_psms.htm
Hope this helps

Resources