bootbot
bootbot copied to clipboard
No matching user found
I am trying to create my first bot using bootbot. It works fine but when trying to create two bots like this : /* const BootBot = require('bootbot'); const bot1 = new BootBot({ accessToken: process.env.ACCESS_TOKEN1_Act, verifyToken: process.env.VERIFY_TOKEN, appSecret: process.env.APP_SECRET });
const bot2 = new BootBot({ accessToken: process.env.ACCESS_TOKEN2_news, verifyToken: process.env.VERIFY_TOKEN, appSecret: process.env.APP_SECRET });
bot1.hear('hello', (payload, chat) => { chat.say('Hello, human!'); });
bot2.hear('hello', (payload, chat) => { chat.say('amazing'); });
bot2.start(); bot1.start(); */
The first bot works fine but the second gives me this error : Messenger Error received. For more information about error codes, see: https://goo.gl/d76uvB
{ message: '(#100) No matching user found',
type: 'OAuthException',
code: 100,
error_subcode: 2018001,
fbtrace_id: 'H4GibS7PBz7' }
Try either:
- setting
webhook: "/bot_news"
andwebhook: "/bot_act"
in your bot constructors and then setting those in Facebook for each bot or - Setting different ports to
bot.start
. Sobot2.start(3001)
andbot1.start(3002)
.
I think the reason bot1 is working and not bot2 is that it is started after it. If you switch the order you start, the bots in, the other will work.
The problem is that you are starting two different express apps on the same port at the same path /webhook
.
@mraaroncruz i used different ports and i switched the order but still one of the first only work. I can't use 2 webhooks because i am using the same facebook app for both
I try to use bot.say(messageId,
${message});
, but it responded the result.
Messenger Error received. For more information about error codes, see: https://goo.gl/d76uvB
{ message: '(#100) No matching user found',
type: 'OAuthException',
code: 100,
error_subcode: 2018001,
fbtrace_id: 'CvuRoC80372' }
I am also getting this error. ngrok and VSCode terminal fire 200 OK Status.
The user said "hello", "hi", "hey", or "hey there" The user said: Hello Messenger Error received. For more information about error codes, see: https://goo.gl/d76uvB { message: '(#100) No matching user found', type: 'OAuthException', code: 100, error_subcode: 2018001, fbtrace_id: 'AdH9H1-LjIK8i8EJv_--Laf' }
edited I got it working, most probably delay with webhooks.