Remember the chat bot hype circa 2016? Well, seeing as we have the ability to implement chat with far greater capabilities at our disposal, I couldnâ€

Verifying Slack Requests in Phoenix

submited by
Style Pass
2024-04-29 22:00:07

Remember the chat bot hype circa 2016? Well, seeing as we have the ability to implement chat with far greater capabilities at our disposal, I couldn’t help but create my own Slack bot powered by LLMs. At the moment, it doesn’t do a whole lot, but it is available to shoot the shit in our Slack rooms, summarize discussions, assign tasks, etc.

Perhaps a low bar, I’m easily nerd sniped by the types of things involved with setting up the chat bot, e.g., integrating with Slack, handling their overwhelming-amount-of events, background processing, and verifiying the authenticity of requests—the latter of which is especially fun as it involves cryptography. So, this post is about verifying the authenticity of requests from Slack’s Events API.

To follow along, you’d need a Phoenix application and a Slack app that is configured to receive events from Slack’s Events API. The Phoenix app will need to be hosted somewhere Slack can send those events to. I used Fly.io.

Leave a Comment