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

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.

Related

Can I create a configuration page for a Teams bot app?

I'm building my first Teams app which will have two primary functions:
Proactively send a message to the channel (the bot is installed into) when a specific event occurs on my backend.
Members of the channel reacts to the message via actions.
I finally have a pretty good idea of how to set this up (I think) - but one part I'm missing is that in order to identify the specific app installation as belonging to one of my customers, I need to be able to allow the installing user to supply extra information like e.g. an API-key so that I can associate the specific channel with my specific customer.
Is there any way of doing this with a bot app? I've found examples for creating a configuration page, but they all seem to be associated with tab apps?
I could of cource have the bot ask the user for the information - but maybe there's a "cleaner" way?
Any examples or tutorials would be greatly appreciated as I find it rather hard to get stuff working using Microsoft's own examples etc. :)
Thanks a lot!
When you receive any message from the user, either by typing to your bot, or even installing it into a channel, group chat, or personal context (where you get the conversationUpdate event), you are able to get specific details off of the activity object. If the user sends a message, for instance, then the text property on the activity object will have a value. Incidentally, this is the same activity you will use to get the conversation details you need for the Proactive message.
With regards your question, the activity class also includes a tenantId property, hanging off the conversation property. This is the unique Microsoft 365 Id for the tenant, which would be what I'd suggest to uniquely identify them for your API, or licensing, or similar.

Slack API - persistent message visible only to a set of users in a public channel

I'm planning to write a slack app, and I need to render messages depending on who read them.
I'm thinking something like: the App should have some options, and user's clients should render the messages depending on the options chosen by the user.
Is there a way to post a persistent message (I mean not an ephemeral message) which is shown only to a user (or a set of users)?
Or
Is it possible to post a message shown differently depending on the user who read it?
I don't need to send private or sensitive data, so if the solution to my problem is a message containing all the content for all the users in the channel, it is perfectly fine. It's just matter of user experience.
I have two constraints:
The user experience for those who don't use the App should not be impacted
I need the messages from the App to be rendered in reply to messages sent by the users, so solutions like "open a new channel" or "send direct messages" are not suitable for my needs.
Thank you all (but the Slack team which, in case let us doing that, it makes that not clear in the documentation :D )
This is not possible unless you create your own client to show/display the messages.
Custom slack apps usually augment to the existing functionality. How do you expect to override the functionality of Native Slack 'Desktop, Mobile & Web' Client.
I am happy to discuss this further, if you have some approach in mind.

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
)

Sending/Receiving multi-recipient SMS - Twilio API

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.

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.

Resources