我正在使用aws lambda通过API网关响应Dialogflow Webhook。我已经使用基本身份验证在实现中添加了Webhook。成功调用了lambda(基于Cloudfront日志),并返回了一个fillmentment_text响应;
exports.handler = async (event, context) => {
return { fulfillmentText: 'IT WORKS' };
};
由于某种原因,我总是得到:
API响应
"webhookStatus": { "code": 13, "message": "Webhook call failed. Error: 502 Bad Gateway." }
答案 0 :(得分:0)
我可以不用快递了。我希望这有帮助。
{
const { dialogflow,SimpleResponse,BasicCard,Image,Suggestions,MediaObject,SignIn,Permission } = require('actions-on-google');
const app = dialogflow({debug:true, clientId: process.env.dialogFlowClientID});
app.intent('Default Welcome Intent', (conv) => {
conv.ask('You made it you rock star');
});
exports.lambdaHandler = app
}