How send notification to Team user - microsoft-graph-api

We have tried to send notifications to Microsoft teams. We have created a bot using this we can send but users want to initiate the conversation.
Also tried graph API shows 401 error.
We want to send notifications to Bot or API without the user initiating the conversation. i.e. sending notification direct to user chat.
Please help?

You can send message to user with out user interaction using graph API. Proactive messages are initiated by bots to start conversations with a user. They serve many purposes including sending welcome messages, conducting surveys or polls, and broadcasting organization-wide notifications. Proactive messages in Teams can be delivered as either ad-hoc or dialog-based conversations. Please check Proactive installation of apps using Graph API and send messages

Related

Is it possible to receive a message from a webchat (on a website) and forward this message to Whatsapp using Twilio?

I'm looking into the Twilio Whatsapp API docs, and cannot find anywhere if it is possible to receive a message sent from a website webchat on a Whatsapp Business Account?
I would like to develop the following:
a user is on my website, and has a quesiton. He/she then opens the chatbox and types their question (non-whatsapp). This message is then sent to the Whatsapp Business Account of the Client and they can talk back and forth with the user.
I hope I have been clear enough, please let me know if I need to supply more information.
Twilio developer evangelist here.
I believe that this would be possible to do for one user messaging at a time, but practically and at scale, not really useful.
If you have a user sending a message through a website that is then delivered to a user through WhatsApp, you could build an application that allowed the user on WhatsApp reply to the message and relay that back to the website.
However, if you have one WhatsApp number registered to send messages on behalf of your application and multiple users were sending messages through the website, all the messages would come from that one WhatsApp number and it would be practically impossible for the user responding in WhatsApp to know who they were responding to.
It would likely be better to connect your users via webchat within the web application and use WhatsApp to notify the the client that there are new messages awaiting their reply.

MS Teams - Sending Messages to Users from External App

The organization that I work for previously used Slack as our collaboration tool. With Slack, I was able to register an app in the workspace and use the provided access tokens to invoke the API to send a message to a user from our external web application. It was very straightforward. There was no intermediate app that needed to be coded to enable this messaging.
Recently, we've transitioned from Slack to MS Teams, and in looking over the Graph API documentation, there does not currently appear to be a way to proactively send a message from an external application to a user. The available permissions for the chatMessage endpoint indicate the availability of only a delegated permission to send a message on behalf of a specific user; no permission exists to send a message on behalf of an external application.
Is it possible to use the Graph API to directly send a message from an external application to a user? Or must a bot application be created in order to achieve this?
It must be a bot application to achieve above mentioned requirement. ChatMessage endpoint works to send a message on behalf of user only.

Microsoft Graph - Send message on MS teams on behalf of a user

Is there a way to send a message on behalf of a user either in private chat or channel. In my case, the admin gives both application and delegated permission for the app. When the admin is part of the chat/channel, the messages are delivered correctly using MS Graph API but when the chat happens between 2 other signed-in users where the admin is not involved, I am not able to send the message as any of the user. I get UnknownError/Unauthorized since the token which is generated is related to admin user.
If we cannot send a message on behalf of a user using MS Graph is there any other way to achieve this. Can MS Bot take care of this scenario? Will each user have to install the bot so that it can send the message even if the Bot is not part of the conversation?
If we cannot send a message on behalf of a user using MS Graph is
there any other way to achieve this.
You can send chat message using Graph APIs. To send message on behalf of a user, your app must get consent from each individual users. Application permission is currently not supported.
Will each user have to install the bot so that it can send the message
even if the Bot is not part of the conversation?
It's a good idea to build Bot and send notifications instead of sending it from one of the user's account. You can use Proactive message to send message. In order to send message, your Bot needs to be installed for each user.
Could you please elaborate more on scenario? Are you looking for something similar to Company Communicator?

Show system messages in conversation history using iOS Twilio SDK

Hi I have been working on one of my apps for integrating chat using Twilio SDK. I would want to know if it is possible to get the system message inside a channel for eg: 'Member A joined the channel', 'Member B left the channel', 'Member C accepted the invitation to join' and so on. It seems like Twilio SDK does not have API to get the system messages or to set them. How can we achieve this?
I also noticed that it can be achieved by setting the custom key-value pair in attributes inside the message and sending it to the channel. But for the newly invited members, they cannot send a message when they are declining the invitation request such as 'Member A declined the invitation to join channel', as they have not joined the channel yet.
Twilio developer evangelist here.
If you want to send persistent system level messages like this, you can do so with a combination of webhooks and the REST API.
The idea is that you can send messages to a channel using the REST API whenever you need one of these system messages. The default user for the REST API is the system and you can then treat messages from system as special for display in your UI.
I mention the webhooks because you can register to receive them for a number of useful events, like members joining and leaving channels. The webhooks may not cover all the things you want, like declining an invite, but for that I would just trigger my own HTTP request from the application to your server.
Let me know if that helps at all.

How to achieve twitter like push notification via AWS SNS?

Is there a way to achieve twitter like push notification via AWS SNS?
SNS send notification to the user when something is happen him or her?
As i know the best way is to create a topic per user.
When user relate event happened,we publish a notification to the topic.
As AWS described the max topic number is 100,000 per account currently.
What if i've 1,000,000 users, it will not work.
Is there a more scalable scheme?
beeth0ven,
SNS supports publishing to a Topic of subscribed device endpoints or direct publishing to individual endpoints. In your case, you'll want to implement direct publishing to each individual endpoint. This allows more control and personal engagement but also means that you'll need to manage those endpoints in your own database and associate each endpoint to a user of your mobile app. Instead of publishing to a TopicArn, you'll publish individual messages to a TargetArn, which is the SNS Platform Endpoint that represents an app and mobile device. TargetArn is also the same call to send an SMS message to an individual phone number.
SNS Publish CLI: (see --target-arn)
http://docs.aws.amazon.com/cli/latest/reference/sns/publish.html
Direct Publishing via the Console:
http://docs.aws.amazon.com/sns/latest/dg/mobile-push-send-directmobile.html

Resources