我遵循API V1的https://developers.google.com/actions/assistant/updates#push_notifications文档。
从我的webhook返回后:
appAi.askForUpdatePermission('check_overdue_tasks')
我从模拟器中收到以下消息: 抱歉,我没有得到任何回复。
缺少什么?
API V1没问题吗?
响应:
{
"audioResponse": "//NExAARUo...",
"conversationToken": "CiZDIzVhMz...",
"expectUserResponse": true,
"response": "Sorry, I didn't get any response.",
"visualResponse": {
"agentLogoUrl": "https://lh3.googleusercontent.com/-VTpjRH_pRB4/Wf99LmZh5jI/AAAAAAAAAAg/2HZnqZAsRHcemFxLz5mhsMoP_YQwUVW-ACMYCGAYYCw/h192-w192/logo-ticatag.png",
"visualElements": []
}
}
DEBUG:
{
"agentToAssistantDebug": {
"agentToAssistantJson": {
"conversationToken": "[\"_actions_on_google_\"]",
"expectUserResponse": true,
"expectedInputs": [
{
"inputPrompt": {
"richInitialPrompt": {
"items": [
{
"simpleResponse": {
"textToSpeech": "PLACEHOLDER_FOR_PERMISSION"
}
}
]
}
},
"possibleIntents": [
{
"intent": "actions.intent.PERMISSION",
"inputValueData": {
"@type": "type.googleapis.com/google.actions.v2.PermissionValueSpec",
"permissions": [
"UPDATE"
],
"updatePermissionValueSpec": {
"intent": "check_overdue_tasks",
"arguments": [
{
"name": "taskCategory",
"textValue": "home"
}
]
}
}
}
],
"speechBiasingHints": [
"$object-name",
"$taskCategory",
"$object-type"
]
}
],
"responseMetadata": {
"status": {},
"queryMatchInfo": {
"queryMatched": true,
"intent": "ff669222-3121-4032-acb9-5f3d609cebf1",
"parameterNames": [
"taskCategory"
]
}
},
"expectedInput": {
"requestedIntent": {
"intent": "ff669222-3121-4032-acb9-5f3d609cebf1"
}
}
}
},
"assistantToAgentDebug": {
"assistantToAgentJson": {
"user": {
"userId": "ABwppHF3IIUlbUcuhVS6Vt0csX0D6h1rtRyXb_Fs1FoO2T0RVz3r0tZSsUrupE_WYWO2sLaTwf6fFw",
"accessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJvcmdhbml6YXRpb25JZCI6IkY5RUIzOUNDLTA4OTktNDFBMC05QTU1LTJGOTgyMEYwREU0NCIsImF1ZCI6WyJkZXZpY2VzIl0sInVzZXJfbmFtZSI6ImZ2aXN0aWNvdCt0aWJlQGdtYWlsLmNvbSIsInNjb3BlIjpbInJpbmdfZGV2aWNlcyIsInJlYWRfZGV2aWNlcyJdLCJsYW5ndWFnZSI6ImZyLUZSIiwiZXhwIjoxNTEyOTc3MzM5LCJ1c2VySWQiOiJCNjJERTEzNC04QzY0LTQ4ODgtOEFENS0yOUM3MDBEOERFRDAiLCJhdXRob3JpdGllcyI6WyJST0xFX1VTRVIiXSwianRpIjoiMzRkMmUwNjktMjI4MS00Yzg4LWI0ZGQtZDBmZTg2ZDkzOGQyIiwiY2xpZW50X2lkIjoiZ29vZ2xlLWFjdGlvbiJ9.eIIo-4Yo42V4Apjyj3NOZRIphgRsME06djHbqSVisVpK6gbSZErWDgVHobna1nUTxbjtnVyKqRVVCfshCpa95ghvHImsx-e7f_PCZplSzHdWeylE9BUNWuG1kVXarGRwLkAe7lHLeT5_j2HNoxW4Mo7bwkXYCziDavdEHks4mXBY5cOEtGd7fqYZfDwEclyNDXxnsifl-ZUEJxRWCiSq8ZFXxxJ21aB0gvDdZ1Zuon_oLEese3LeLeYxLyTy0j2badxJrbvr9AOQrHGGBcdvZfujAIWxlszr4V2Ew1BK23LedWOn5HBGD8ahJFrz_1EANR9IgF8dbeDxApxGQNagRQ",
"locale": "fr-FR",
"lastSeen": "2017-12-10T20:19:37Z",
"userStorage": "{\"data\":{}}"
},
"conversation": {
"conversationId": "1513115166506",
"type": "ACTIVE",
"conversationToken": "[\"_actions_on_google_\",\"actions_capability_audio_output\",\"actions_capability_screen_output\",\"ff669222-3121-4032-acb9-5f3d609cebf1_id_dialog_context\",\"google_assistant_input_type_keyboard\",\"setup_alerts_dialog_context\",\"setup_alerts_dialog_params_taskcategory\"]"
},
"inputs": [
{
"intent": "actions.intent.TEXT",
"rawInputs": [
{
"inputType": "KEYBOARD",
"query": "home"
}
],
"arguments": [
{
"name": "text",
"rawText": "home",
"textValue": "home"
}
]
}
],
"surface": {
"capabilities": [
{
"name": "actions.capability.AUDIO_OUTPUT"
},
{
"name": "actions.capability.SCREEN_OUTPUT"
}
]
},
"isInSandbox": true,
"availableSurfaces": [
{
"capabilities": [
{
"name": "actions.capability.AUDIO_OUTPUT"
},
{
"name": "actions.capability.SCREEN_OUTPUT"
}
]
}
]
},
"curlCommand": "curl -v 'https://api.api.ai/api/integrations/google?token=1a22c3f7fd24449480f34f409b2320d0' -H 'Content-Type: application/json;charset=UTF-8' -H 'Google-Actions-API-Version: 2' -H 'Authorization: eyJhbGciOiJSUzI1NiIsImtpZCI6ImE0ZTgxMmI3MDVjNWUwMjYxZmI4NWQ0ZjAyZDBjZmY1NjkwMjM2NDUifQ.eyJhdWQiOiJ0aWJlLTM4MDQwIiwiaXNzIjoiaHR0cHM6Ly9hY2NvdW50cy5nb29nbGUuY29tIiwianRpIjoiMzQzNzk1NTQxZDEwZjFhMjc3ZDM3NWVjZWJiZTVlZThiMTU4MTI5NyIsImlhdCI6MTUxMzExNTE3OCwiZXhwIjoxNTEzMTE1Mjk4LCJuYmYiOjE1MTMxMTQ4Nzh9.PGuWnKB4zNF7zqir_vS26oXyTJ9APL3BBObVsPfqr9oODy_HYrW1wqV49r9ttYgrjea6dTTmj2Z9MsH3LGOxSDHzni2qJaFAewZufnt3ks26_e0b7Tt8qpEXcbeS4zZXg3tENQ4VaS1Rmc5OpZ028F50acJdwWVWTphleUB5XHQOk-3Kg8ts84KtzKjo6HKpe4QSEo6SlWF-AN7Y3XsTbPa3H4nFDTfNB6QFUcv0EdEtr62Q1clmobCePwZzPfp4C8CunRRf8Q-mhiuuF6YcWEww14X9iJIwUCkYulTiCUw7Rrn3legSwf9Y4ppKNx66j7tRxlf6qsDs8Ax0vS2oXw' -A 'Mozilla/5.0 (compatible; Google-Cloud-Functions/2.1; +http://www.google.com/bot.html)' -X POST -d '{\"user\":{\"userId\":\"ABwppHF3IIUlbUcuhVS6Vt0csX0D6h1rtRyXb_Fs1FoO2T0RVz3r0tZSsUrupE_WYWO2sLaTwf6fFw\",\"accessToken\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJvcmdhbml6YXRpb25JZCI6IkY5RUIzOUNDLTA4OTktNDFBMC05QTU1LTJGOTgyMEYwREU0NCIsImF1ZCI6WyJkZXZpY2VzIl0sInVzZXJfbmFtZSI6ImZ2aXN0aWNvdCt0aWJlQGdtYWlsLmNvbSIsInNjb3BlIjpbInJpbmdfZGV2aWNlcyIsInJlYWRfZGV2aWNlcyJdLCJsYW5ndWFnZSI6ImZyLUZSIiwiZXhwIjoxNTEyOTc3MzM5LCJ1c2VySWQiOiJCNjJERTEzNC04QzY0LTQ4ODgtOEFENS0yOUM3MDBEOERFRDAiLCJhdXRob3JpdGllcyI6WyJST0xFX1VTRVIiXSwianRpIjoiMzRkMmUwNjktMjI4MS00Yzg4LWI0ZGQtZDBmZTg2ZDkzOGQyIiwiY2xpZW50X2lkIjoiZ29vZ2xlLWFjdGlvbiJ9.eIIo-4Yo42V4Apjyj3NOZRIphgRsME06djHbqSVisVpK6gbSZErWDgVHobna1nUTxbjtnVyKqRVVCfshCpa95ghvHImsx-e7f_PCZplSzHdWeylE9BUNWuG1kVXarGRwLkAe7lHLeT5_j2HNoxW4Mo7bwkXYCziDavdEHks4mXBY5cOEtGd7fqYZfDwEclyNDXxnsifl-ZUEJxRWCiSq8ZFXxxJ21aB0gvDdZ1Zuon_oLEese3LeLeYxLyTy0j2badxJrbvr9AOQrHGGBcdvZfujAIWxlszr4V2Ew1BK23LedWOn5HBGD8ahJFrz_1EANR9IgF8dbeDxApxGQNagRQ\",\"locale\":\"fr-FR\",\"lastSeen\":\"2017-12-10T20:19:37Z\",\"userStorage\":\"{\\\"data\\\":{}}\"},\"conversation\":{\"conversationId\":\"1513115166506\",\"type\":\"ACTIVE\",\"conversationToken\":\"[\\\"_actions_on_google_\\\",\\\"actions_capability_audio_output\\\",\\\"actions_capability_screen_output\\\",\\\"ff669222-3121-4032-acb9-5f3d609cebf1_id_dialog_context\\\",\\\"google_assistant_input_type_keyboard\\\",\\\"setup_alerts_dialog_context\\\",\\\"setup_alerts_dialog_params_taskcategory\\\"]\"},\"inputs\":[{\"intent\":\"actions.intent.TEXT\",\"rawInputs\":[{\"inputType\":\"KEYBOARD\",\"query\":\"home\"}],\"arguments\":[{\"name\":\"text\",\"rawText\":\"home\",\"textValue\":\"home\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"}]},\"isInSandbox\":true,\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"}]}]}'"
},
"sharedDebugInfo": [
{
"debugInfo": "Empty TTS.",
"name": "Tts"
}
]
}