Receive De-Authentication Events in Email and Slack
Learn how to receive de-authentication events in email and slack using notification API and Zapier.
With authentication events you can configure Khoros to push notifications to you in real-time when social media and partner accounts are added, removed, re-authenticated, and de-authenticated. De-authentification events in particular can be very useful to alert your team if Khoros can no longer act on behalf of that user/account. Reasons to trigger a de-auth could include:
- Password changes
- Both a token and refresh token expiration
- Or any special security requirements your team may implement
Time is of the essence! Receiving these real-time alerts can prompt you to log into Khoros and reauthenticate your impacted account(s) quickly to prevent any disruption in scheduled publishing or ingestion for your company’s Outbound Marketing and Social Care use cases. Let’s walk through a tutorial to hook into these events and trigger an alert via email or Slack to the right people on your team.
Prerequisites
For this tutorial, you will need a Zapier account, an email, and a Slack channel you can post to. While the details may be different, everything presented here is also achievable via IFTTT in lieu of Zapier as well.
Overview
First we will subscribe to the credential-deauth
event in the Notification API and direct the events to a webhook in Zapier. Once the event reaches Zapier, we setup an Email action to notify the appropiate employee(s) who maintain the credential information to accounts in Khoros that an account has been de-authenticated. To be extra sure, we also push the notification to a Slack channel.
Set up the webhook
Because Khoros needs a dedicated webhook to send events to, the first step will be to start creating a Zap. Choose Webhook and click next:
Choosing Webhook as Zapier Trigger
We’ll create a Catch Hook so Khoros can direct events to Zapier:
Setting up Zapier to Receive Events
Next we’ll choose data as the child, then:
- Copy the Zapier webhook URL
- Create an API request to the Create a Subscription endpoint with the following information in the request body, replacing the
notificationUri
value with the webhook URL copied earlier.
For example:
{
"eventName": "credential-deauth",
"notificationUri": "https://hooks.zapier.com/hooks/catch/12345/xyz123/"
}
- Send the request to create a subscription targeting your webhook.
- Send an email
- Turn it on!
Bonus points - add Slack too!
- Add an Action
- Search for Slack
- Authorize Zapier to your Slack account
- Tell Zapier which channel to post into, setup a message, and broadcast to the whole channel
Updated almost 3 years ago