Webhook integrations

I’d like for InControl to be able to call webhooks for various events.

For example, There are a number of use cases for Captive Portals:

  • For access mode “SMS”, I’d like InControl to call a webhook with the mac address and phone number entered, and interpret the HTTP result code. A 200 would indicate that its OK to send an auth code; a 403 would indicate that the number is blocked, etc.
  • A similar webhook could be attached to an “Email” access mode, where InControl passes whatever data was gathered.
  • The “Token” access mode could be adapted to allow a webhook to both provide and validate access tokens. This would eliminate the need to administer access tokens directly in InControl.

Beyond that, It would be useful for InControl to call a webhook on selected log events, or when a device is goes online/offline. I’m sure I could come up with many more use cases, but the Captive Portal ones are particularly compelling.

3 Likes

Seems a shame there’s so little traction on this. It seems like it would be valuable to enterprises to allow their own applications to govern captive portal access. Microservices / webhook architectures are becoming the norm. Can someone from Peplink even acknowledge if this would be considered?

1 Like

HTTPS notifications with JSON payloads and the full IC2 API fulfill all of my needs currently. I would rather they focus development on maintaining the API for feature parity against the WebUI than redirect resources to WebHooks - but thats only my 2 cents.

From experience, the IC2 team are really responsive to customer demand. I’m sure if more members here want WebHooks too they will seriously consider it.

1 Like

Hi Martin.

I didn’t mean to sound critical of the peplink dev team. I was lamenting
the lack of community traction. Maybe I’m alone in wanting this.

What do you mean by “HTTPS notifications with JSON payloads”. That’s pretty
much what I’m looking for. Am I missing something?

In Group Level Notifications you can turn on Http/s notifications for the group - really useful.
I send these to a node-red server that then fires of webhooks to Slack and our helpdesk ticketing system for device based events.

image

1 Like

Ahhhh, gotcha. Yes, I have a webhook listening to that. Like you, I use it for “device down” notifications. It is a nice feature.

Still, I’d love to have microservice-style control over captive portals.

Can you give an example of this?

@bfast example of what exactly?

1 Like

How you integrated it into slack.

Thats a big topic. I’ll see if I can put together a tutorial with detail but the outline if you just want slack integration is:

  1. create a web hosted php file that acts as the target for the http notifications from InControl
  2. when notification is sent to that php file it decodes the JSON payload and then constructs a new payload using the content it has received that is structured in the right way for a Slack webhook.
  3. then it posts the new JSON payload to the slack webhook which generates a slack notification.
2 Likes

Thanks you!