Digital Assistant and Mobile

Get Involved. Join the Conversation.

Topic

    Imrankhan Kasim
    Unable to integrate chatbot with Facebook Messenger !!
    Topic posted January 24, 2018 by Imrankhan Kasim, last edited May 4, 2018 
    145 Views, 11 Comments
    Title:
    Unable to integrate chatbot with Facebook Messenger !!
    Summary:
    Unable to integrate chatbot with Facebook Messenger !!
    Content:

    Hi Everyone,

    I would like to subscribe new page with my Demochatbot which I have created but at the end while integrating with webhook of Facebook the call back url  prompts error message  "This URL contains an invalid domain".

    Find the screenshot given below for your reference.

    Webhook URL

    http://bots-connectors:8000/connectors/v1/tenants/chatbot-tenant/listeners/facebook/channels/5809C88A-77E8-4906-A30D-429E30514E33

    Verify token

    BjZx502BbjsNiSTd2j6DYEMtey0VAAoX

    I have been used the same webhook URL and Verify token which generated by chatbot..

    Please help me on this fix.

    Thanks.

    26656207_1960792410601110_3935921155474456576_n.jpg?oh=2961db189afd8b106cfb04b7274163d6&oe=5AE796D8

    Comment

     

    • Marcelo Jabali

      Well, http://bots-connectors:8000 is definitely not a valid domain and I'm pretty sure Facebook won't be able to hit it.

      It looks like you're running a developer instance of the Intelligent Bots (VM or Docker image) and I'd recommending exposing that with something like ngrok (https://ngrok.com/) and then providing that domain to the Facebook Webhook.

    • Krunalmehta

      Hey Imran,

      Did you find the solution? I am facing the same issue.

    • Marcelo Jabali

      See the note above regarding the domain provided to Facebook.

    • Imrankhan Kasim

      Hi Krunal.

      Along with the update given by Marcelo Jabali ON above, please try this too which makes easier for you "http://www.ateam-oracle.com/getting-started-with-chatbots/".

      Thanks.

      REGARDS,

      IMRANKHAN K

    • Avinexus7

      Hi Imran,

      I'm trying to get to the page where one can create a bot. I have created a stack and it's dependent resources as well. But on the Mobile page, there is no mention of bots. Is there any process to be followed to activate the bots page? Or is it accessible directly?

    • Alexm

      Have anyone found a working solution for this yet??

    • Arun Pareek

      To everyone who is interested in this thread.

      This root cause of this issue is the URL being used in Facebook.

      That URL has to be a public URL. If you have provisioned an OMCE instance, the the URL will be the load-balancer URL of the stack followed by the port and the URI.

      If you have deployed the bot on a local VM, then you would need to run ngrok on port 8000 which will give you a public IP.

      When creating a webhook in facebook, it has to communicate with a public URL to send a test message and get an event back.

      Hopefully that helps.

      Cheers

    • Alexm

      Hi Arrun,

      I am aware that we need to have a public URL for the webhook. I have created the chatbot in the dummy instance that was provided for this course.

      This is what I got from the 'Settings' tab of the same:pastedImage_0.png

      The host process of the webhook URL displayed here is http://bots-connectors:8000which seems to be not resolved.

    • Alexm

      Oh..I got it now...missed the ngrok URL.

    • Alexm

      For everyone from the MOOC who have this same doubt, let me expand upon what Arrun said earlier:

      1. To connect your chatbot engine to a messenger bot, you will have to get the webhook URL of your bot engine.

      2. For that first you have to go to the settings tab in your bot:pastedImage_0.png

      3. But this won't be a public url, you will be able to avail the corresponding public URL from the ngrok instance running in the cloud. If you didn't understand anything I said just now, look at the set of URLs that you received when you started with the demo instance:

      pastedImage_1.png

      Just get this ngrok URL. Now when you got both the webhook private URL and ngrok URL, you can find the public URL for the webhook by following an answer by Rohit to a copy of the same question:

       

    • Krunalmehta

      Hi,

      My connection between bot->ngrok->messenger is working fine. All the setup is done.

      Now when I send any message from messenger to bot, it is received at bot side successfully and bot responds too, but it did not show in messenger(log can be seen in attached screen shot).

      Screen Shot 2018-05-04.png

      Any idea what could be the issue?