我使用lib @ line / bot.sdk并使用pushMessage可以工作,但是ReplyMessage不起作用!我尝试修复它enter image description here,但也没用 请帮助我
exports.dialogflowFirebaseFulfillment = functions.https.onRequest((request, response) => {
var userId= JSON.stringify(request.body.originalDetectIntentRequest.payload.data.source.userId);
var replyToken= JSON.stringify(request.body.originalDetectIntentRequest.payload.data.replyToken);
function Welcome(agent){
message={"type":"text","text":"1234"};
client.pushMessage(userId,message); (this can work)
client.replyMessage(replyToken,message);(this can't work)
};
)};
错误代码:
错误:HTTPClient.wrapError上的请求失败,状态码为400 (/srv/node_modules/@line/bot-sdk/dist/http.js:70:20)在 HTTPClient.instance.interceptors.response.use.err (/srv/node_modules/@line/bot-sdk/dist/http.js:16:88)位于 process._tickDomainCallback(internal / process / next_tick.js:229:7)