Push Notifications with Conversational Webhook - actions-on-google

I'm trying to get permission to send push notifications on Google Assistant through the conversational webhook.
I'm following the steps here under Actions SDK JSON
I have the first part with "Hi! Welcome to Push Notifications" working.
Then I send the second response under the ask for the UPDATE permission.
The problem is that it seems this is triggering some event on the google assistant side where it asks again for permission to send notifications see here
I think this requires me to define some other intent but how do I properly handle this so it will send me the request with the userID?

Related

webhook not receiving events from Messenger recurring message opt-in

Facebook recently released an optional Recurring Notifications feature for Messenger.
My group has attempted to use this feature in our app; in our chatbot flow, we present the user with the opt-in message, and when they click on the opt-in button, we are supposed to get a webhook event notification. Unfortunately, no request is coming to our webhook when the user clicks the button.
We've done some sanity checks:
The app is subscribed to messaging_optins notifications feed (v11).
I'm certain the webhook itself is configured properly, because our server is receiving other notification feeds (e.g. messages).
The problem also doesn't seem to be with our opt-in request button configuration, because even the Test button in the Facebook Developers dashboard (which is supposed to send a sample messaging_optins payload to our server) does not result in a call to our webhook.
Possibly irrelevant details: the page connected to this app is registered in Kenya and the webhook server is running on an AWS instance in Germany. We have another page registered in India connected to AWS in India, and that connection is working fine despite identical configuration.
What other things should we troubleshoot to identify the problem here?

Google Assistant expose incoming webhook

Is it possible to create a webhook on the google assistant that I can http post data to for it to broadcast?
I want to make a real simple application where I can send tweets from specific users to the assistant to read out loud.
That is a "yes, but" question. The Actions platform allows you to send notifications to users whom you have previously queried for permission and who have consented. When they pull down the notification and tap on it, your Action runs a special intent whose name was specified at the time you ask for permission. Details are here:
https://developers.google.com/actions/assistant/updates/notifications

Google action "isn't responding right now" after account linking completed

Im developing a google action with account linking.
When a new user does an initial request to my action, I get it over the webhook and respond with the SIGN_IN response. The assistant asks the user to link the account. The users does so, and the action then reports "XXX isn't responding right now", yet there were no further webhook requests to respond to. There is nothing in the logs viewer other than the initial request.
The next request by the user works fine, indicating that account linking did indeed complete. How can I avoid this error to the user??
This is usually because you either have no Intent in Dialogflow which can handle the actions_intent_SIGN_IN event or you have one and it is not set to do webhook fulfillment and returns no response.

How to correctly implement push notifications using Gmail API

I've done all steps required and I'm successfully receive push notifications on my server endpoint. I want to get message text snippet and sender to be displayed in push notification but this requires a call to history API with valid user token. Moreover I want to filter this to push only new messages not all Inbox activity. In what way should I do this to provide safe experience. Should I store Gmail auth tokens on serverside and make calls from there and then push a notification with proper message data to users ? Is token storing and handling proper and safe on my server ? Or maybe there is another way ?

How to trigger message without messaging bot first

I am learning the facebook api and I am curious how to do this.
On this website(https://botacademy.com/), they use manychat and you can click the opt in button (on web) and it automatically accesses your messenger inbox without prompts or auth.
It then sends you a programatic message. All of the tutorials I follow require the user to send a message first..
Do you know what endpoint of the API they are using to accomplish this?
Obviously I do not know what their code looks like, but:
that is a send to messenger button, which allows you to authenticate with a bot and an app, and sends your information to the webhook.
This counts as interacting with the bot, because you clicked the button and opted into the experience.
FBM Platform Policies have this to say about opting into messages and send to messenger:
How messaging is triggered:
...
Person requests a message from a business via a plugin, such as Send to Messenger