planningcenter / developers

Planning Center API docs and support
https://developer.planning.center/docs/
85 stars 8 forks source link

Webhook Error states my URI is incorrect #1205

Closed Dmantech21 closed 2 months ago

Dmantech21 commented 2 months ago

API - Webhooks

When a webhook is executed, an error is stating that the URI is incorrect. We have set the URI to: https://api.safevisitor.io/api/PlanningCenter?clientId=1961

To reproduce, we are sending webhooks to the URI above.

A POST message should be sent without failing on the URI pattern

image

I have..

seven1m commented 2 months ago

Is it possible there is a space before the URL? That's what it looks like from the screenshot.

Dmantech21 commented 2 months ago

Is it possible there is a space before the URL? That's what it looks like from the screenshot.

There is no space at the front of the URL

seven1m commented 2 months ago

Indeed, there is a space preceding the URL in the subscription settings. You can fix that here: https://api.planningcenteronline.com/webhooks

I'll make a note to do some extra validation on the URL when the subscription is saved so we can show you an error upon creation instead of upon delivery of an event.

Dmantech21 commented 2 months ago

I checked there prior to responding, so I am fairly certain that we do not have a space at the front.

seven1m commented 2 months ago

I think I see what is happening! The space does not appear in the form input itself because it is a type="url" input. But I can see the space if I right-click and inspect the page.

space

If you delete the value from the input and type it back in, the space should go away. Very sorry about that! We will change that form so it validates URLs better!

Dmantech21 commented 2 months ago

Thanks. This has now been resolved.