Google Nest Camera API Pub/Sub Events Not Triggering - google-cloud-pubsub

I'm working with the Google Nest API and have set up Pub/Sub events, but they don't seem to be triggering.
Attached is a screenshot of the Pub/Sub Push method I've set up.
I'm using the second generation Google Nest Camera (Wired). I'm looking to build an integration with Airtable such that when a person is recognized, a post request is sent to an endpoint with their name, and my Airtable database is updated.
Seems like this may be a problem of Google's, but could also be that I'm not setting things up properly.

Related

listen to Firestore's onSnapshot while app is not running

I want my app to be able to listen to onSnapshot while it is in background , I know that I can use background task for this by I don't know how to set it up .
btw I'm trying to implment this so that my app can push a notification whenever a new doc is received while app is in the background .
Most mobile operating systems severely limit what the app can do while it is backgrounded. Keeping an active connection open to a server is one of those things that has never been allowed on iOS, and has gotten more restrictive with recent Android versions.
The better approach is to run the code that detects a relevant change on a server, and then use Firebase Cloud Messaging (or APNS directly if you're only targeting iOS) to send a notification to the user. When they they tap on that notification, your app is started and you can load the data from Firestore.
If you don't want to run your own server, Cloud Functions is a common alternative for this, as it has built in triggers that respond to changes in Firestore. For an example of this exact scenario, see the documentation on notify users when something interesting happens.

Use Cloud Pub/Sub to trigger sending of email

I'm trying to figure out how to use Cloud Pub/Sub to trigger the sending of an email when a file is added to a storage bucket.
Currently using PHP72 in Google App Engine standard environment. First I created a Topic that creates a message when a file is added to the storage bucket. Then I created a Pull subscription which reads the message. I can view the messages in the GCP console, but what I would like to happen is that I want to be notified by email, preferably with a copy of the file added to the email as an attachment. Is this possible? I tried looking for a solution or tutorial but came up empty.
You can implement the send mail login in a cloud function which will be triggered by Pub/Sub (Node.js,Python,Go).
Using Pub/Sub to trigger a Cloud Function
Instead of using a pull subscription, you should probably use a push subscription with App Engine, combined with one of the third party mail services such as Send Grid or MailJet.
The upload of an object to GCS triggers a message to be sent to the topic, and the push subscription delivers that message to App Engine.
Unfortunately, there aren't any full tutorials asking for exactly what you want, but hopefully this helps. Feel free to request a community tutorial for this by filing an issue on the GCP community toturial repo.

Gmail API Users.settings.sendAs: update, does not reflect on web client unless reloaded

I'm using the Gmail API Users.settings.sendAs: update to automatically update the signature settings of our users. The issue I'm having is the change in the signature does not get reflected in the Gmail web client unless the web page gets reloaded. Our users can spend several days, even couple of weeks, without reloading their Gmail web page, making the update almost useless.
I would like to know if there is a way for the web client to pick up the new settings once the changes are made through the API without requiring the user to reload the page?
You may want to use Push Notifications feature in Gmail API. This lets you watch for changes to Gmail mailboxes. You can use this feature to improve the performance of your application. Whenever a mailbox changes, the Gmail API notifies your backend server application.
Then, you may proceed with Synchronizing Clients with Gmail if you need to process changes. As discussed in the documentation, you can also use push notifications to trigger partial synchronization in real-time and only when necessary.
Hope that helps!

Does bluemix have an API to fetch application monitoring/metrics results?

I see that bluemix has a service called Monitoring and Analytics. All I see from that service are dashboards. I am looking for the information the dashboards are providing in the form of an API. For example, if I want to be notified that my application is down or it is slow running, etc .. Is there a way for me to either receive such alerts or for an API that I can poll periodically?
thank you
The Monitoring & Analytics service does not offer an API to retrieve its collected metrics. We realize that supporting a programmatic interface would be helpful and it's in our backlog to add that capability.
However, M&A does support the other part of your question regarding alerts. There should be an Events tab in your dashboard. In the upper right corner, there's a dropdown to "Configure events policy". If you select it, you can enable Availability alerts ("Is my app down?") and/or Performance Monitoring alerts which are geared to the app's run-time type (Liberty, Node.js, etc.). In that same dropdown you can also "Configure notification". If you specify your email address in the notification dialog, you will start receiving alerts when your Bluemix application is down or running slowly.

Access not configured error message

I've set up oauth and am properly retrieving an access token.
Here is the response I get from hitting
https://www.google.com/accounts/AuthSubTokenInfo?access_token=<token>
parsed_response="Target=645428735890.apps.googleusercontent.com\nSecure=false\nScope=https://www.googleapis.com/auth/userinfo.profile\nScope2=https://www.googleapis.com/auth/userinfo.email\nScope3=https://www.googleapis.com/auth/glass.timeline\nScope4=https://www.googleapis.com/auth/glass.location\n"
which I believe properly shows that I have requested the correct permissions.
A call to
https://www.googleapis.com/mirror/v1/timeline?access_token=<token>
yields:
"errors"=>[{"domain"=>"usageLimits", "reason"=>"accessNotConfigured", "message"=>"Access Not Configured"}]
Having trouble figuring out what this means. I don't have an actual piece of glass hardware. The docs make it seem like this access token would allow me to make any requests to the mirror api.
Is there an additional setup or permission I need to ask for that I missed? On the application side? Is this related to my google account and having not set up glass?
EDIT:
Okay, from the authorization docs:
Select the Services tab in your API project, and enable the Google Mirror API.
However, I'm not seeing Google Mirror API listed on the services tab?
The Mirror API is currently in developer preview and access is limited to I/O Explorers who have received their Glass device. You can subscribed to this issue on our issue tracker to get updates on when the Mirror API will be public.

Resources