bootbot icon indicating copy to clipboard operation
bootbot copied to clipboard

No matching user found

Open WIEM-S opened this issue 6 years ago • 4 comments

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' }

WIEM-S avatar Jun 24 '18 16:06 WIEM-S

Try either:

  • setting webhook: "/bot_news" and webhook: "/bot_act" in your bot constructors and then setting those in Facebook for each bot or
  • Setting different ports to bot.start. So bot2.start(3001) and bot1.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 avatar Jun 25 '18 05:06 mraaroncruz

@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

WIEM-S avatar Jun 25 '18 07:06 WIEM-S

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' }

clonn avatar Dec 01 '18 19:12 clonn

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.

tebogo37 avatar Aug 15 '19 14:08 tebogo37