fb-messenger-bot-api icon indicating copy to clipboard operation
fb-messenger-bot-api copied to clipboard

OAuthException on quickreply

Open themakunga opened this issue 3 years ago • 1 comments

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!

themakunga avatar Aug 26 '21 14:08 themakunga

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.

ifritzler avatar Jan 22 '23 08:01 ifritzler