Is it possible to configure Bubble API endpoints to respond to HEAD requests (not POST requests)?

Hi everyone,

I am trying to configure an API endpoint to work with webhooks from a Stripe Partner platform called Quaderno. The issue is that in order to set up a webhook, Quaderno requires that the API endpoint respond to a HEAD request first, before they will set up the web hook and allow you to send requests to your API endpoint from it.

Has anyone had any experience with this sort of thing? I will post their full guidance info below, for context. Thanks in advance for any help or direction you can offer with this!

Webhook URLs should be set up to accept HEAD and POST requests. When you provide the URL where you want Quaderno to POST the data for events, we’ll do a quick check that the URL exists by using a HEAD request (not POST).

If the URL doesn’t exist or returns something other than a 200 HTTP response to the HEAD request, Quaderno won’t be able to verify that the URL exists and is valid.

This will return 201 Created with the current JSON representation of the webhook if the creation was a success.

Has anyone figured this out? I can’t seem to get the bubble back-end to respond with 200.

{"message":"Bad Request","errors":[{"resource":"PushSubscription","field":"callback url","code":"GET to callback URL does not return 200"}]}

I am having the same issue. The application I’m using to push data to bubble requires both HEAD and POST requests, otherwise a 200 response will not generate. I cannot initialize a webhook subscription without Bubble accepting HEAD requests. Currently it’s returning a “405 Method Not Allowed”.

Ideas anyone?

Since Bubble added “GET” request in Backend WF, you can do a head request if you set GET trigger instead of POST. However, if your service need to always fetch the HEAD (and not just on the first time), you will run into an issue because actually, Bubble doesn’t allow us to save a Backend WF with the same name. (vote this request: Allow Workflow APIs to handle both GET and POST requests | Bubble)

@Jici thank you, but I don’t understand. I’m using POST to create a subscription for a webhook event. The provider says"
Webhook URLs must accept both POST and HEAD HTTP requests. We use POST requests to deliver events to the URL, and HEAD requests to check the URL’s validity when creating a subscription.

The issue is that you cannot have a webhook (backend WF) with the same name. So you create the subscription while your backend WF is set to GET (the head request will work) and once the subscription is created, you switch your backend wf to POST. This will work only if your API service provider only do a check when creating the subscription.

Thank you again. I will continue to investigate.