Developers

Socket to me

Build custom Slack integrations on-premise with Socket Mode

작성자: Jim Ray2021년 1월 12일Francesco Ciccolella의 일러스트

Socket Mode enables you to build powerful Slack integrations safely behind your company’s firewall and unlocks access to the platform’s most interactive features, from the Events API to Block Kit to Workflow Builder.

Today, millions of daily active users get exponential value from bringing their work into Slack. For developers, this means that as Slack grows, you grow with us, sharing in our goal to improve the way teams collaborate through business-critical integrations.

Capabilities that Socket Mode unlocks

Socket Mode enables a quick and secure way to start building apps without additional infrastructure management.

Previously, anyone could use the Slack platform to build apps based on the standards and protocols of the open web, using HTTP to send and receive messages and other data. This didn’t require any special tooling or software—fundamentally, any Slack app is a web app.

However, for anyone hosting their apps on-premise or behind a firewall, this presented a challenge for integrating with Slack, specifically when routing Slack API data to apps within a restricted environment.

Some customers built proxies to safely transfer packets from the internet to their network. Others created WebSocket connections using the RTM API, but the RTM stream primarily contains message data and doesn’t support many of the richer interactive features of the platform, like Events, Block Kit or shortcuts.

For Bob Bell, a software engineer at Dell Technologies, using Socket Mode means not having to manage additional layers of software.

“This let us replace a layer 7 proxy, which required coordination to set up,” Bell says. “With Socket Mode, we can just immediately start writing a Slack app.”

Develop locally, deploy anywhere

Any app, new or existing, can connect over Socket Mode. The logic stays the same, and the payloads remain identical—regardless of delivery method.

We often recommend tooling like ngrok to manage local development. Now you can enable Socket Mode, connect from your local machine, build out the logic of your app, then deploy to a web server and switch back to HTTP.

Enable Socket Mode through the settings section of your app’s configuration page.

Apps can choose the delivery protocol, WebSocket or HTTP. It’s a binary switch that gets flipped for your app that can happen at any point and flip back if necessary. Your app simply needs to be able to handle either HTTP or WebSockets.

With Socket Mode enabled, an app connects to Slack by establishing a secure WebSocket connection. From here, all dispatches from Slack are sent to your app over this WebSocket and nothing is sent via HTTP.

Build better with Bolt

After enabling Socket Mode, all that’s required for your app is a WebSocket connection. There are no new proprietary protocols or custom SDKs required—industry standards all the way.

Socket Mode support is available in JavaScript, Java and Python through our SDKs and Bolt, a Slack-first framework for building apps. Using Bolt, new and existing apps can enable Socket Mode by simply adding a few new lines of code.

If you’re building an app without an SDK, fear not! Here’s a quick implementation guide to help you along the way.

Getting started

To build with Socket Mode, visit our API documentation for an introduction to some core concepts, the new app token, and related sample code.

Need more hands-on support? View our webinar on building with Web Sockets at any time to quickly get up to speed.

We look forward to a whole new class of Slack apps hosted everywhere. Happy building!

We value your questions and feedback. Email us at feedback@slack.com.

이 포스트가 유용했나요?

0/600

훌륭해요!

피드백을 주셔서 감사합니다.

알겠습니다!

피드백을 주셔서 감사합니다.

죄송합니다. 문제가 발생했습니다. 나중에 다시 시도해주세요.

계속 읽기

새 소식

Slack과 세일즈포스에서 팀의 성과 달성을 앞당기는 새로운 도구 출시

팀, 도구 및 데이터 간의 격차를 해소하여 모두가 더 빠르게 협업함으로써 고객 중심 솔루션을 제공하기 위한 방법

혁신

포춘 선정 100대 기업의 약 80%가 Slack Connect를 사용하여 Digital HQ를 구축하는 이유

수상 경력에 빛나는 이 제품을 사용하여 고객 관계를 강화하고 외부 파트너와 원활한 커뮤니케이션을 구축하세요.

Developers

Slack 파트너의 고객 유지와 성장 가속하기

Frontiers에서 발표된 플랫폼 기능을 확인하고 어떻게 개발자가 더 많은 사람들에게 도달하고 참여를 유도할 수 있는지 알아보기

Developers

더 빠르고 간편해진 Slack 앱을 소개합니다

다양한 차세대 기능을 통해 사용자 지정 Slack 앱을 더 쉽게 구축, 관리, 및 배포할 수 있습니다.