I want to send slack notification (message as an app to another workspace).
I have created a slack app as slack_app
I have installed slack_app into my own_workspace as own_ws.
A external users say user_x has installed my slack app into their workspace.
I want to automate this sending notification business using third parties for example, using courier or using something else library.
I have webhook url of user_x's slack workspace which i caught during oauth installation and that is something can be used to send messages but how to automate this sending notification via some third party.
How we can send notification/message into another workspace ? I did research a bit but could not find relevant information anywhere.
Related
I am coding a React Native app and I using Firebase push notification service.
In my app, users can send message for each other and I want to notify them when they get message.
I found one way for native android I can code for react native it is not problem just I want to know if there is better way. I can make post to directly to Firebase service with using Http post.
This is the link which way I found: https://blog.usejournal.com/send-device-to-device-push-notifications-without-server-side-code-238611c143
I want to push notification to specific device without server, is there another way to do this?
Sending a message to a device with Firebase Cloud Messaging requires that you specify the FCM server key. As its name implies, this key is supposed to only be used in trusted environments, as knowing it allows one to send any message they want to all users of the app. For this reason it is not possible to secure send messages directly from one device to another device with FCM.
Instead you will have to run code in a trusted environment, such as your development machine, a server you control, or Cloud Functions. Your client-side application code invokes the server-side code, that ensures the call is authorized, and then calls the FCM API.
For more on this see:
How to send one to one message using Firebase Messaging
How to send device to device messages using Firebase Cloud Messaging?
In Urban Airship, when I am composing a notification, I can target specific users by searching for a Urban Airship channel_id (device ID):
I sent from Urban Airship the push notification that I am showing above, and I received it successfully. Now I want to do the same thing, send a push notification to a specific device, but now using the Firebase console. The problem is that in Firebase, in the step where I need to specify the target, it only allows me to choose User segment or topic. I was expecting to see a third option: Target specific users (for sending notifications to one or many specific GCM/FCM device token IDs. So my alternative is to add a GCM/FCM device token ID to a topic and then send the push notification to that topic, which is something that I have successfully done before. Nonetheless, that would be a workaround and not the way I would prefer to do this. Is it possible to send push notifications to specific users (by defining the target GCM/FCM device token IDs) from the Firebase console? Thank you.
UPDATE 1: See how the Firebase console (https://console.firebase.google.com/) only shows User segment and Topic as the Target:
First Step:
Second Step:
Third Step:
By design, the notification feature in the console is for sending out broadcast-type events. Sending user-specific alerts would be more of a programmatic operation done through the API.
For sending test messages, there is a console tool for this, explained here.
Note that it is possible to send a notification to one device by subscribing a device to any topic and sending the notification to that topic in the console (keep in mind topics are public and you can't prevent users from signing up to them; fine for testing most likely).
Another alternative is to send a message via HTTP or curl. Perhaps the best resource for this is the quickstart/messaging example.
I have my client app with Android installed in several devices.
I also have my Server app that send messages to those apps.
The problem is that some devices receive the messages and other don't.
I get the error "MismatchSenderId" when sending the message to those devices.
I divided the problem, so I open the firebase console and send notifications to my apps (I have the Token for each of them). So, using the console app, I get errors on the same devices that using my server. But as I said, every device is using the same app.
Any help of the reason?
So to start of, I'd point out the description for MismatchSenderId error:
A registration token is tied to a certain group of senders. When a client app registers for FCM, it must specify which senders are allowed to send messages. You should use one of those sender IDs when sending messages to the client app. If you switch to a different sender, the existing registration tokens won't work.
As per our discussion, it was pointed out that you created a new Firebase Project instead of importing your Google Project that you were using for GCM. From the new project, the google-services.json was generated and used for the app, which resulted for new tokens to be associated with the new Project's Sender ID. To visualize it properly:
GCM Registration Tokens > only receive messages from > Google Project (1st)
New Tokens > only receive messages from > Firebase Project (2nd)
As a solution, I advised for you to import the Google Project to the Firebase Console, generate a google-services.json from that Project and replace the one in your app with that, which associates the app to that (correct) project. This in turn created tokens that are now associated with your 1st Project.
GCM Registration Tokens > only receive messages > Google Project (1st)
New Tokens > now receive messages > Firebase Project (2nd) Imported Google Project (1st)
Hope that makes sense.
Good to mention from the discussion:
After applying the changes, you mentioned that the error persisted, but it was a different issue that was fixed by simply using the Server Key.
Linked a post during discussion.
Supporting #AL's answer, basically you need to uninstall the app on all the devices and install the app again so that all devices receive new tokens that correspond with the newly connected firebase project database.
Need to enable the following api in the Google Console (https://console.cloud.google.com/)
Firebase Cloud Messaging API
Cloud Messaging
Then your senderId will be identified
We are developing a Xamarin UWP app that is supposed to receive Push Notifications using WNS. We are using Amazon SNS to send notifications. We made sure that the app is registering itself with proper channel URI to our backend, package name of the app is same as in the store and using Cognito credential put device token entry in Amazon application arn. I have sent raw message to device endpoint and message received in device properly. We couldn't send as Json format and tried as mentioned in below link.
https://anbu2016.wordpress.com/2016/03/17/push-notification-with-wns-and-aws-sns/
But didn't know where to receive notification from application.
For example, ReceivedRemoteNotification as override method present in iOS and it will help process the notification. In my process sent argument then based an argument, we can navigate to different page. How can we do this in UWP using JSON format.
Please help me on this.
Regards,
Cheran
I know that Firebase has recently added support for Push Notifications and while this is a great thing, I only seem to be able to send push notifications manually via the Notifications Panel.
What I'd like to do is to send push notifications within a user scope...Let me explain that. Each User in my App has an account and then each user can join a group. Within this group the user can perform tasks and has a list of chores to do. Now when certain tasks are due for example I want to remind the user of doing it with a push notification. For 1-10 I might be able to pull this off manually, but is there a way to dynamically based on the data in the Database send out Push Notifications?
I know that certain Push Notifications can be created using the Analytics tool such as "Hey you have not visited for 3 days, please come back whatever"... but I'd like to register push notifications such as "I just created a task, this task needs to be done within 3 days. Remind me in 3 days if the task is still not done".
Is this possible with Firebase or do I need to have my own server connecting to Firebase and handling those events?
-xCoder
You need to implement FCM in your client and in a server. Let me put this straight:
First, you need that your client, or app, to register into FCM and get a FCM token that will be used to identify that device uniquely.
Then, store that token wherever you like. It can be into firebase database or other server you may like. I recommend you to store it into firebase if you are using it as a database for your users; that's my case.
Also, you need to implement a http or xmpp server in order to send FCM messages to your registered devices containing the data you are interested in. For example, you can implement a Google App Engine endpoint (can be done with Android Studio and Java) that is quite simple or a NodeJS module, depending on your preferred language.
If you are using Firebase as database you can connect from your server with the appropriate SDK and get the FCM tokens you want from your users, and then send the message to those with data. Don't forget to secure your serve.
The way you implement your server algorithm to send FCM messages depends on your app purposes.
Hope it is clear enough for you. Also you can find all the documentation with a short video that explains the general structure here: https://firebase.google.com/docs/cloud-messaging
You can use cloud functions to trigger on any create, update or delete operation in your database and in the trigger event, you can choose to send in FCM push notifications to the devices of your choice.
Here is the documentation regarding the use and structure of a cloud function: https://firebase.google.com/docs/firestore/extend-with-functions
Hope this helps!