Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] Set webhooks on custom server bottender v1.4 #867

Open
RomeHein opened this issue Sep 15, 2020 · 1 comment
Open

[QUESTION] Set webhooks on custom server bottender v1.4 #867

RomeHein opened this issue Sep 15, 2020 · 1 comment

Comments

@RomeHein
Copy link

RomeHein commented Sep 15, 2020

Describe the bug
Hi, first thanks for your amazing work!
I've an issue starting a bot with a custom express server. I think I'm missing a point.
I've followed this exemple from the documention v1.4
My code is available here on my public repo: https://github.com/RomeHein/PassPass/tree/bottender

My issue is that whenever I run the command:
npx bottender messenger webhook set

I got this error:

⚠ We can not find the webhook callback URL you provided.
? Are you using ngrok (get URL from ngrok server on http://127.0.0.1:4040)? Yes
✖ Failed to set Messenger webhook
⚠ connect ECONNREFUSED 127.0.0.1:4040

When I try something like this:
npx bottender messenger webhook set --webhook https://passpass2000bla.ngrok.io

I get this error:

✖ status: 400
✖ data: {
  "error": {
    "message": "(#2200) Callback verification failed with the following errors: HTTP Status Code = 404; HTTP Message = Not Found",
    "type": "OAuthException",
    "code": 2200,
    "fbtraceId": "AwNgerefgehpXjJMljJvwwef423f"
  }
}

☝️ When I run npm run dev I don't get the webhooks callback address I used to get when running bottender directly without a custom server.

📚 I'm not sure but I might need to start a ngrok server, in that case it means the documentation is missing some step in order to get something running without having to search.

EDIT:

So in order to make it work properly I had to do these steps in additions of the documentation:

npm install ngrok -g
ngrok http 5000

After this the normal procedure works fine (npx bottender messenger webhook set).
I think that something the documentation should point out.

@neemiasbj
Copy link

Same here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants