Facebook bot callback error with multiple platforms in credentials

Hi, trying to set up a fairly basic bot. I have had it running successfully on a REST server for about a week, so I know that the ngrok setup is okay.

I duplicated it, changed its credentials file on my local machine (not the server), and launched it. I managed to get it connected to facebook and all working, but I was using a temp ngrok, so 6 hours later it was down.

From the documentation, it seems like if your credentials.yml contains the data for multiple platforms (and the various API info they need), then you should be able to use a single server for both REST and Facebook.

So , I stopped the server, added facebook credentials to my credentials.yml and restarted. However, now that I am changing the webhook callback on facebook, it is not letting me verify the callback.

Have I missed any steps here?

Thanks, Pete

@Juste , I am so sorry to ping, but i’m really hoping to have this sorted by tuesday.

I can supply copies of my credentials.yml, or whatever is needed.

Thanks again.

Hey @RarCeth. No worres, let’s see how we can solve it :slight_smile: First of all, the callback URL looks quite suspicious to me and I think this is the issue. Can you give me some background for where draconai.au comes from?

Im paying for the ngrok basic plan, and you can reserve domains. I reserved draconai, in their Aus server space. So it ended up being draconai.au.ngrok.io as a subdomain. Once you feed that into ngrok as

‘ngrok -subdomain=draconai.au.ngrok.io http 5002’

it creates the resultant pointer with an extra ngrok.io. It looks hell weird, but its reachable. My REST api is working perfectly off that running server, only the facebook im having trouble with.

**EDIT I should mention that I copied that URL straight from the ngrok console window, then added the webhooks pathing onto it, same as I do for REST

So, I am using http://draconai.au.ngrok.io.ngrok.io/webhooks/rest/webhook in my Unity application

**EDIT2

Also, to add some more detail: I am on an AWS windows server for this. I have this (among other things) in my inbound security group:

Is this enough to allow the traffic needed by facebook? The fact that its getting 200 status makes me feel that its fine, but im making sure :stuck_out_tongue:

**EDIT (hopefully final edit?) So my ngrok tunnel is only http. Its midnight here, but in the morning I am going to try making a ngrok config file, and putting the details for both a tls and a http tunnel in there, and start it with ngrok start --all

“Accessing custom domain tunnels over HTTPS will still work, but the certificate will not match. If you have a TLS certificate/key pair, try using a TLS tunnel.”

I have been using a reserved domain :stuck_out_tongue: Trying to fix this now, but I am extremely new to servers

Fixed (I think). Instead of using -subdomain=x, I used -hostname=x.

Solved the verification error, but its not actually posting messages to the bot, or the tunnel. Gonna figure out why…