fb-messenger-bot-api
fb-messenger-bot-api copied to clipboard
OAuthException on quickreply
Hi, I'm currently using the api to integrate a custom made fulfillment for Dialogflow, when I try to send quick replies to the user I got the next error message:
2021-08-26T14:46:37.151Z ? workplaceHook: {
2021-08-26T14:46:37.151Z ? workplaceHook: error: {
2021-08-26T14:46:37.151Z ? workplaceHook: message: 'An unknown error has occurred.',
2021-08-26T14:46:37.151Z ? workplaceHook: type: 'OAuthException',
2021-08-26T14:46:37.151Z ? workplaceHook: code: 1,
2021-08-26T14:46:37.151Z ? workplaceHook: fbtrace_id: 'Ar79mEkigYjU16TIat8NNva'
2021-08-26T14:46:37.151Z ? workplaceHook: }
2021-08-26T14:46:37.151Z ? workplaceHook: }
I've even try to convert the response using the Interface IQuickReply, but the outcome is the same
const replies: IQuickReply[] = resp
.quickReplies!.quickReplies as unknown as IQuickReply[];
const rss = await messagingClient
.sendQuickReplyMessage(
user.uid,
resp.quickReplies!.title!,
replies,
);
console.log(rss);
with only text I have no problems!
migth be the best if you provide a mock example about the data pass to the replies parameter. all seems to be ok testing locally with the integration and unit tests by default.