How to list all google directory subscription channels - active-directory

I'm working on integration with Google Directory and create subscription channels to watch users updates using this API https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/watch
POST https://admin.googleapis.com/admin/directory/v1/users/watch
I created some channels and don't have their id and resourceId to stop them according to this documentation and now I can't create any new channels https://developers.google.com/admin-sdk/directory/reference/rest/v1/channels/stop
I didn't find any API endpoint to list all my current customer id channels to stop them. How can I stop any subscription (watch) channels related to the customer id so I can create new watchers?

Unfortunately, Google has not enabled support for a way to list (i.e: a LIST method) active subscriptions enabled for a given admin user/domain. The only method they've exposed is a STOP method to stop an existing subscription, but it requires the caller already know the channel metadata associated with the subscription.
The good news here is if you did not store this information upon creation, you should be able to find the required parameters as a part of an event notification. I believe they might be in the headers accompanying each notification event.

Related

How to set properties for google pubsub in app?

I am trying to use google pub/sub to provide subscription service to users.
I created one topic and created one subscription(push) to verify normal operation.
But I want to add one more subscription (push), to differentiate between devServer and localServer.
I want to distinguish whether it is devServer or localServer by reading the attribute value of the message through filter.
We can differentiate this on the backend via the pub/sub Filter.
But I don't know how the app allows the user to purchase a subscription service and enter local or dev information in messages coming through rtdn.
We need your help.
Please let me know if my assumptions are wrong or if I need more information!

Is there a way to raise SNOW ticket as notification for query failures in snowflake?

I was going through the integration documents available for snowflake & service now. But, all documents are oddly focussed on sf consuming snow data for analytics. Didn't find anything related to creating tickets for failures at snowflake. Is it possible?
It's not about the monitoring & notification aspect of snowflake but connecting with service now and raise a ticket for query failures (tasks,sp etc.)
Any ideas?
There's no functionality like that as of now. I can recommend you open an Idea for it and if enough customers want it our Product Management will review it.
For the Snowpipe, we found a way to use it. We send the error message to SNS and then we can do a Lambda function to call the Rest API of ServiceNow to create a ticket.
For Task, we find that it is possible to use External Functions to notify to AWS whenever the Task fails, but we haven’t implemented it.
Email is a simple way. You need to determine how your ServiceNow instance is processing emails. We implemented incident creation from Azure App Insights based on emails.
In ServiceNow find the Inbound Action you need to process the email or make one.
ServiceNow provides every instance with an email account
Refer to enter link description here
The instance email is usually xxxx#service-now.com.
If your instance url is "audi.service-now.com", the email would be "audi#service-now.com".
For a PDI dev#servicenowdevelopers.com, e.g.; dev12345#servicenowdevelopers.com

Firebase Notification Inbox in Web App (Not FCM)

I'm trying to implement notification inbox similar to stack overflow inbox where I can see related notification.
For now, I just want user to be notified whenever new comment is posted in the post (show number of notification when user logs in and whenever user opens that inbox it should go away).
I'm not sure how this can be done using firebase and how I should structure the data.
I'm thinking of having a comment collection inside a Post collection and use the onSnapshot to listen to changes in Post collection but how would i actually implement the notification part (whether comment is read or not)?
I would recommend to have a collection just for notifications like notifications/{userUid}/notifications/{notificationID} like here:
We use that structure for all of our apps that have such a feature. The notification itself is send using FCM but we store the data of it in such a separate collection. It also has the value isRead where we store just a boolean or a timestamp when the notification is read from the user. Each user has his own notifications collection and can only see those and change only the isRead value by the security rules.
With a limit query we show him only the last 25 to 50 messages.
If you don't know how to trigger the sending of the notifications: You will need to use the Firebase Cloud Functions and setup a trigger when a post/comment is created and send an FCM message and a notification in your users notifications collection as shown above.

Send Email When Match in Firebase Database

I'm trying to build a web app using AngularJS and Firebase that sends an email to two users that match on certain parameters. The users submit their information first and if there is a match with another person in the database, I want to send an email to both those people. For example, if two people, A and B both have the age of 25, I would like to send A and B an email with certain information. Is this possible using Firebase?
If you are NOT running a server
Yes
You could achieve it by using a service like Zapier.
You could create a zap linking FireBase and an e-mail service like Mandrill.
A Zap combines triggers and actions — whenever the trigger event occurs, Zapier automatically completes the action for you!
When there is a match, update a special key in your FireBase database.
As Zapier is listening to updates of that particular key, it will react by sending your e-mails via Mandrill.
March 2017 UPDATE
New tools have now been added to Firebase to trigger database event handlers:
database events triggers: https://firebase.google.com/docs/functions/database-events
cloud functions for FireBase: https://firebase.google.com/docs/functions/functions-and-firebase
using cloud functions to send e-mails through sendGrid:
https://cloud.google.com/functions/docs/tutorials/sendgrid
If you are running a server
Your server can easily check the values in FireBase and send e-mails accordingly. That would then be a
Yes, of course :)

Create custom paypal button with link direct after payment

I am trying to create a custom paypal button for selling digital goods, that will direct the buyer to a link that will allow him to download the file.
I've read a bit this paypal article about advanced html variables but I am not sure which I have to use to make it work: https://developer.paypal.com/webapps/developer/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/
Obviously the download should only initiate based on the payment ID to prevent free downloads, or is that done automatically by paypal?
What I would recommend us utilizing Instant Payment Notification (IPN) to handle all your post-payment processing tasks like updating your database, sending out email notifications (including one with a download link), etc.
Instant Payment Notification (IPN) is a message service that notifies
you of events related to PayPal transactions. You can use IPN messages
to automate back-office and administrative functions, such as
fulfilling orders, tracking customers, and providing status and other
transaction-related information.
This will allow you to not only automate the procedures, but also correctly handle things like e-checks or any other type of payment that may originally be in a "pending" status. You wouldn't want to deliver the digital goods until that payment actually clears. With IPN you will get 1 notification that your script can handle when the payment comes through as pending, and you would get another one when the payment updates to Completed, or Failed, or whatever.
The IPN's happen in real-time so buyers won't have to wait on anything. Whatever you're doing within the script would happen instantly upon the transaction completing.

Resources