Our company now uses ms teams. Whenever an incomming or outgoing call is made the name of the company or customer is not displayed in teams. So I need to display details to that call in a custom app. Therefore I wanted to use the callRecord subscription.
But in order to get the subscription working with my app, I need to have an API that gets all the subscription calls and provides the data via websockets to my app, right?
Isn't it possible that the app gets the subscriptions?
Today Microsoft graph change notifications only support delivering the change notifications gtuys webhooks/http post.
If you want those change notifications to be delivered to your front end application via Web sockets, you need to build your own backend solution to receive the change notifications via http post and relay it via Web sockets. Additionally you can request the feature on uservoice
Related
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.
I am currently evaluating Microsoft Teams Graph API endpoints for us and our customers. Our goal would be to compile a list of past callRecords for a specific user.
Since the API does not (currently) offer an endpoint to just fetch a list of past/done callRecords we need to subscribe to the /communications/callRecords notifications.
Using the example project specified in the documentation ( https://github.com/microsoftgraph/nodejs-webhooks-rest-sample) we successfully created subscriptions and were also able to update these subscriptions (not part of the example project).
I am running the example project on my local machine using ngrok as suggested.
So far everything works, but we do not get any notification. I made various calls with the Teams Desktop App using the same user that gave admin consent for accessing callRecords but I never received a notification on any test subscription.
The current active subscription in question is "07b23247-66d9-46b9-ac67-a72d5d702628" and was created around 2020-09-09T09:20:00.000Z (I do not have the precise minute/seconds). It since then has also been successfully renewed.
Here is an extract of the subscription creation response:
{
'#odata.context': 'https://graph.microsoft.com/beta/$metadata#subscriptions/$entity',
id: '07b23247-66d9-46b9-ac67-a72d5d702628',
resource: '/communications/callRecords',
changeType: 'created',
expirationDateTime: '2020-09-12T07:20:09.036Z'
}
I do monitor all incoming traffic using ngroks http://127.0.0.1:4040 endpoint and so far I only received the validationToken requests. That tells me that the endpoint does indeed receive requests.
I am currently at a loss as where to look further for an error on my side.
I opened this stack overflow is as it is the requested action to take according to the troubleshoot section of the example project (https://github.com/microsoftgraph/nodejs-webhooks-rest-sample/blob/master/TROUBLESHOOTING.md).
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
I've set up Firebase to send push notifications to users of my app. However, I'm not sure what's best practice regarding user-to-user communication, such as chat clients. Should I get the device token at each startup of the app and use that for sending, or should I create a new topic for each "chatroom" that both parties are required to subscribe to? For instance when accepting a chat request.
If the first option is the best, how does this work? If the device is assigned a new token upon app startup, how can I be sure a given ID points to a specific device? The whole concept seems fragile - but could someone guide me to the most efficient solution?
I'm only looking to send chat messages / chat invites with push
Depending on the size and the privacy of the chatroom you can choose between using:
topics made for big groups, and without protections on joining / leaving
device tokens that you need to store in your server implementation.
On the plus side they allow you to control the who is receiving the
messages, and to send messages to individual device.
The device token does not change every startup.
It is created when the application is launched for the first time, and can be updated in special cases. When the token change (again, this is rare) the FirebaseInstanceIdService.onTokenRefresh() callback is called.
In a generic chat application you might want to:
first authenticate the user with your login system
upload to your server the mapping user-id > device-token
send messages to the users via the FCM server-side APIs.
Update to address one of the comments:
The server-side API allows to send the same message to multiple tokens in the same HTTP request. See registration_ids in https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream-http-messages-json
You should not use the server-side API in the client, because that would require you to add the API-KEY in the application which is a security issue (people could decompile the app and read the key)
The storage structure is up to you. For user-id > multiple-device-tokens a dictionary could work.
If the token are non reusable. So it's safe to send messages to expired token.
Token generation requires internet connectivity, so it could take some time.
To handle token after user registration see this question:
How to launch FCM ID Service only after a particular activity is triggered?
I am working on a project where I have implemented web API with asp.net identity to authenticate users. An iPhone app will be accessing this web API in order to perform several tasks like authorization using identity db, subscribe to groups etc.
I am going to publish this web API in windows azure and going to use Azure notification hub for sending the notifications. Now in my iPhone app the user can subscribe to one or more groups to get notified to that group events. i.e A user can subscribe to "Cricket" and "Math" group in order to receive the notifications of that groups. So these groups really becomes Tags for the notification hub.
Now my question is There are two ways to register device to notification hub.
1) using app itself
2) using the web API that I have created.
I want to follow the second approach. I want the users devices to be registered to notification hub through my web API.
How can I achieve that? I didn't found any satisfactory code snippet for this purpose. Can any one provide me better clarification or code snippet on this?
Thanks
you can refer to the following link- http://www.ankitblog.com/2014/11/azure-notificationhub-sending-push.html and http://www.codeproject.com/Tips/845491/Azure-Notificationhub-Sending-Push-Notification-to for details of that. Its fairly simple