api-ai

redirect_uri_mismatch when OAuth2 account linking from Google Home Simulator

烈酒焚心 提交于 2019-12-03 21:52:44
问题 I am developing an account linking integration for an "Actions on Google" integration with API.AI for use with Google Home. When I test this agent in the simulator (https://developers.google.com/actions/tools/web-simulator) As expected, this is my response: { "response": "It looks like your conference manager account is not linked yet. You can link conference manager to your Google Account from the Google Home app.", "audioResponse": "//NExAARC..."content_copy, "debugInfo": { "sharedDebugInfo

Google Assistant Dialogflow API V2 webhook ETag error

别等时光非礼了梦想. 提交于 2019-12-02 10:54:18
问题 I'm trying to return simple text response and display a basic card within Google Assistant app using the following code: public GoogleCloudDialogflowV2WebhookResponse Search(GoogleCloudDialogflowV2WebhookRequest request) { GoogleCloudDialogflowV2WebhookResponse whr = new GoogleCloudDialogflowV2WebhookResponse(); whr.FulfillmentMessages = new List<GoogleCloudDialogflowV2IntentMessage>(); whr.FulfillmentMessages.Add(new GoogleCloudDialogflowV2IntentMessage() { Platform = "ACTIONS_ON_GOOGLE",

Dialogflow: Respond based on values and other conditional responses

谁说我不能喝 提交于 2019-12-01 17:23:12
I have $dinetype variable obtained from the user. But I would like to give response based on what value has been set in $dinetype variable. In addition to giving responses, I also need to set relevant context. How do I do this in DialogFlow? if($Dinetype=='dineout') ask ('which restaurant would you like to go to?') set_context ('awaiting-restaurant') if($Dinetype=='takeaway') ask ('When would you like to take away?') set_context ('awaiting-takeaway-time') Is it programmable at all? Or is it possible to achieve something equivalent to the above in the UI? You can't do this in the Response

API.AI: How to stop AsyncTask on click of the AIButton?

做~自己de王妃 提交于 2019-12-01 05:30:13
I’m using AIButton in my app and I have a AsyncTask which gets executed after AIButton is clicked and receives some command and AsyncTask sometimes takes too long to execute. Here’s my code: final AIConfiguration config = new AIConfiguration("xxx", AIConfiguration.SupportedLanguages.English, AIConfiguration.RecognitionEngine.System); listenButton = (AIButton) findViewById(R.id.micButton); config.setRecognizerStartSound(getResources().openRawResourceFd(R.raw.test_start)); config.setRecognizerStopSound(getResources().openRawResourceFd(R.raw.test_stop)); config.setRecognizerCancelSound

Dialogflow: Respond based on values and other conditional responses

不打扰是莪最后的温柔 提交于 2019-12-01 03:27:28
问题 I have $dinetype variable obtained from the user. But I would like to give response based on what value has been set in $dinetype variable. In addition to giving responses, I also need to set relevant context. How do I do this in DialogFlow? if($Dinetype=='dineout') ask ('which restaurant would you like to go to?') set_context ('awaiting-restaurant') if($Dinetype=='takeaway') ask ('When would you like to take away?') set_context ('awaiting-takeaway-time') Is it programmable at all? Or is it

redirect_uri_mismatch when OAuth2 account linking from Google Home Simulator

谁说胖子不能爱 提交于 2019-11-30 23:06:17
I am developing an account linking integration for an "Actions on Google" integration with API.AI for use with Google Home. When I test this agent in the simulator ( https://developers.google.com/actions/tools/web-simulator ) As expected, this is my response: { "response": "It looks like your conference manager account is not linked yet. You can link conference manager to your Google Account from the Google Home app.", "audioResponse": "//NExAARC..."content_copy, "debugInfo": { "sharedDebugInfo": [ { "name": "Account Linking Url", "debugInfo": "https://assistant.google.com/services/auth

Force user to relink his/her account

ε祈祈猫儿з 提交于 2019-11-30 22:42:49
Very simple use case explaining my problem: Given my app asks for a pin for some interactions. Now the user gives me three times a wrong pin. Then, I want to reset his access and force him to re-link his account. I can do this pretty easily in my internal database, but I need a way to tell google that his currently used token is not valid anymore. Else, Google Assistant resists in sending me the now rejected token. Update 2018-03-01 : With the new built-in intents/events, I also tried sending the actions_intent_SIGN_IN event via the followupEvent attribute, but this only lead google assistant

How to fetch device location using API AI?

北战南征 提交于 2019-11-30 19:14:20
I am using GUI tools provided by API AI to create Actions. Is it possible to fetch device location? I have heard that this is possible by requesting permissions. Is this documented anywhere? An example/code snippet will be very useful. The documentation is a bit unclear. I hope this can help someone. All you have to do is create a child fallback intent for the intent you are requesting permissions from. To do so you need to click on the "Add follow-up intent" link on your intent. Note that the link will only appear when you hover it. Select the fallback option from the dropdown list and a

How to fetch device location using API AI?

亡梦爱人 提交于 2019-11-30 03:43:48
问题 I am using GUI tools provided by API AI to create Actions. Is it possible to fetch device location? I have heard that this is possible by requesting permissions. Is this documented anywhere? An example/code snippet will be very useful. 回答1: The documentation is a bit unclear. I hope this can help someone. All you have to do is create a child fallback intent for the intent you are requesting permissions from. To do so you need to click on the "Add follow-up intent" link on your intent. Note

DialogFlow V2 Webhook - Expects Speech responses Immediately and not after async requests

北城余情 提交于 2019-11-27 21:55:05
问题 I have a DialogFlow V2 node.js webhook. I have an intent that is called with a webhook action: const { WebhookClient } = require('dialogflow-fulfillment'); const app = new WebhookClient({request: req, response: res}); function exampleIntent(app) { app.add("Speak This Out on Google Home!"); // this speaks out fine. no error. } Now, if I have an async request which finishes successfully, and I do app.add in the success block like this: function exampleIntent(app) { myClient.someAsyncCall