Using Twilio Chat on iOS, is it possible to send a small amount of custom non-message data between users? - ios

We have an app built with Twilio Chat for iOS and everything is working very well. However, we now have a requirement to invite the other chat participant to join a video room, and we would like to send the invite signal through the Twilio Chat channel that is already established (similar in functionality to the Typing signal.)
I know Push Notifications are supported by Twilio Chat, but that seems like overkill for this use case, where a simple signal is all that's needed.
What is the easiest way to send a very small amount of non-message data between Twilio Chat channel participants?

Twilio developer evangelist here.
When you send a message with Twilio Chat you can also set an Attributes field which can contain JSON. You can then use this to signal that the message is not for printing on the page, but a service message or invite. You will then need to updated your UI to read the attributes of a message and decide whether to display it or use it to create the Video chat.
Let me know if that helps at all.

Related

Broadcast-like chat using Twilio

I'm using Twilio Conversations for a chat service in my project. Currently, we have only normal 1-to-1 chat which is handled using frontend SDKs. It's working properly. My new requirement is something like WhatsApp broadcast: the sender can send messages to multiple participants, but on the receiver's side, it should be a normal chat message. Is it possible to implement using Twilio? How can I implement this?
Twilio developer evangelist here.
You can definitely do this with Twilio Conversations! Here's a way to do it using the Twilio CodeExchange.
Here's the JS version of that CodeExchange app on GitHub as well.
Edit: A Messaging PM says that Conversations is not the right product for notifications/bulk messaging. They're positioning Conversations and its features for bi-directional/conversational messaging and Messaging for transactional messaging (notifications, bulk messaging, verifications, etc.)
What they've seen people do in the past:
get list of numbers, iterate through them with Messaging API to send out bulk marketing message
set up the 'from' number (twilio sender) with Conversations autocreation, so that if someone replies it creates a Conversation
Handle the interactive dialogue with the person who wrote back using Conversations
Let me know if this helps at all!

How to make Incoming SMS via Twilio Appear and Generate Notifications in Bitrix

Hi I've integrated Twilio with Bitrix and am able to send outgoing sms that do reach the receiving number, but the incoming reply texts do not appear on the contact profile or generate notifications. To summarize, I need help making incoming sms appear in contact profiles and generate notifications for all/most employees.
I heard one method was to use Bitrix24 webhook for authorization and API REST for data. If this method works then I need a step-by-step on how to do it.
I have limited coding experience.
I've tried generating a Bitrix webhook and setting that as the incoming URL for the text messages in Twilio but the replies still did not appear.
Thanks.

Send mass texts with iOS

Is there anyway to send the same text to multiple contacts not as a group text. I have been told that it would need a server to accomplish this. If that is the case I would like to be able to still send texts from my current number not a new number. I have checked out Twilio but have not gotten very far.
Twilio developer evangelist here.
You cannot send mass text messages using Twilio and your existing phone number.
One option you might have is, if you have a Mac you can control the SMS app programmatically to send lots of SMS messages. Here's a blog post with some example code to do that: https://www.twilio.com/blog/2017/06/drawing-pixel-art-text-messages-signal-video-wall.html
That might not be of much help, but while you can send lots of SMS messages with Twilio, you cannot do so using your existing number.
Yes you could send mass texts out to different numbers using twilio. No you could not use your current number.
You would have to purchase a new twilio number that has SMS messaging enabled.
Look at the Twilio documentation and their get started guide, figure out the language you want to create your server in and you will be sending texts in no time. https://www.twilio.com/docs/quickstart/node/programmable-sms You would run the webserver. Twilio does not offer a swift or ios based SMS solution.
https://www.twilio.com/docs/quickstart?filter-language=swift

Custom background image with CallKit, And Twillio programmable voice

I am looking for a way of having a custom background for an incoming call using CallKit.
My app is a Voip app using Twillio.
If the user had already received a call from a Twilio in the past, he is able to save this number (From call history), and the next time the contact will call, a custom background image will be displayed.
But when saving the contact, the only information there is, is "social profile", no number.
What is actually been saved?
Is there a way of programmatically saving a contact from Twilio received with CallKit?
Twilio developer evangelist here.
When you receive calls from another App using the Twilio Programmable Voice SDK you won't receive a phone number along with the call.
When calls are made app to app, you only need the identity of the other user that you are calling. No phone numbers are required to make this call.
Then, the TVOCall attributes from and to will be set to client:FROM_IDENTITY and client:TO_IDENTITY (where the identities are those from the users of your app).
If a call did come from a phone to the app, then the phone number would be included as the from attribute and you'd be able to save the contact with a phone number.
I'm not sure how to turn the information you do get with an app to app call into a proper contact though. Sorry.

Send XMPP message element multiple destinations (Facebook Chat API)

I'm using Facebook Chat API in an iOS app. I already can send a message successfully to a Facebook friend. Now I'm wondering if a can send the same message to multiple recipients.
I don't know if it's technically possible or there's any limitation about that.
I know that I can create N messages for N users and send one by one. But depending on the number of Facebook friends that the user can select, it can take a long time until all the messages are delivered. If this is the only case, should I open one different thread for each message that is going to be sent with the XMPP stream?
I appreciate any resolution or clue for this question.
There's an XMPP extension XEP-0033: Extended Stanza Addressing which supports multicasting messages to multiple recipients. The extension has progressed to draft status, however few XMPP servers or clients support it. I doubt Facebook Chat does, and couldn't find any mention in the XMPPFramework source.
I don't think there's a better way than sending the same message to multiple recipients. Some servers may require you to pause between sending lots of identical messages, and I wouldn't be surprised if that were true of Facebook Chat.
Multi-User Chat is another way to accomplish this with XMPP, but unfortunately Facebook Chat doesn't support MUC.

Resources