Originally posted by David List
Hey Guys,
Just been testing out the new webhook events and it’s awesome. But, it appears there is no support for Auth using API Keys? OAuth is working fine. Will API Keys be supported for these events?
Originally posted by David List
Hey Guys,
Just been testing out the new webhook events and it’s awesome. But, it appears there is no support for Auth using API Keys? OAuth is working fine. Will API Keys be supported for these events?
I was able to subscribe to webhook using API Key and it is working
Heres a helper i wrote to assist with subscribing to webhooks
Thanks heaps for sharing that helper, Anthony ![]()
Just to clarify though — your snippet is hitting the /webhook_subscriptions/object endpoint. That one did originally only support OAuth (you even had to swap a code to prove the registration), but ServiceM8 added API key support in the last 6 months, which has been great because it doesn’t require any auth flow to register a webhook.
The bit I’m talking about is the newer /webhook_subscriptions/event endpoint. That one currently only works with OAuth — you don’t need to swap a code anymore, which is a win, but it would be even nicer if it also supported API keys like the object endpoint now does.
Hey Guys,
I’ve just confirmed with team that both the old object style webhooks and the new event based webhooks are compatible with oAuth and API Keys. To make API Keys even more accessible for people getting started we’ve dropped the requirement to respond to a challenge when connecting a new url.
More Info here:
https://developer.servicem8.com/docs/webhooks-overview#/
Cheers,
Cody
Hey Cody, thanks again for the clarification earlier — that really helped. After more testing I’ve found two separate issues worth flagging ![]()
GET /webhook_subscriptions with API KeyGET /webhook_subscriptions with an API key does not return any of the event-based webhooks — it just comes back empty.DELETE on Event Webhooks with OAuth2job.invoice_paid, job.quote_accepted, job.created, job.status_changed, job.invoice_sent, and company.updated).GET /webhook_subscriptions endpoint correctly showed them all in an array.DELETE endpoint, it instead deleted all event webhooks — not just the targeted one.So to summarise:
GET /webhook_subscriptions despite being registered and firing correctly.If the team can take a look at these two, that’d make the new event webhook system bulletproof — the functionality itself is awesome, just a couple of rough edges here.
Cheers,
David