Connection to FB Messenger Through Callback URL (API struggles)

Hi all, I’ve been trying to connect to FB messenger and am downright stumped. After finally learning what a querystring is (despite using them all over my app already grr), I am unable to parse them from FB’s inital API call.

Heres the FB docs:

Handling Verification Requests

When you add a new subscription, or modify an existing one, Facebook servers will make a GET request to your callback URL in order to verify the validity of the callback server. A query string will be appended to this URL with the following parameters:

hub.mode - The string “subscribe” is passed in this parameter
hub.challenge - A random string
hub.verify_token - The verify_token value you specified when you created the subscription
When your server receives one of these requests, it needs to:

Verify the hub.verify_token matches the one you supplied when creating the subscription. This is a security check so that your server knows the request is being made by Facebook and relates to the subscription you just configured. This value is only passed on the initial API call to APP_ID/subscriptions.
Render a response to the GET request that includes only the hub.challenge value. This confirms that this server is configured to accept callbacks, and is used for security verification on Facebook’s side.

I am able to parse only the authentication querystring as far as I can understand. Is there a way to grab other querystring data?

From what I understand of reading the Bubble Reference, you can authenticate via a querystring such as, “url.whatever/api/1.0/wf/workflowTitle?api_token=NightmareStringOfDigits123”

but FB is actually sending: url.whatever/api/1.0/wf/workflowTitle?hub.mode=subscribe&hub.challenge=123abc&hub.verify_token=whatYouInputOnFb

How can I get at this info? Naturally, @NigelG needs to be invoked here for his consummate Zapier-ing, which I suspect may be the workaround here…

Thanks, gang.

3 Likes

I’m having the same issue. Any updates?