Socket Mode versus HTTP Request URLs
When to receive events and interactive payloads over Socket Mode WebSockets or a public HTTP Request URL, and how Socket Mode works: the xapp app-level token with connections:write, apps.connections.open, envelope_id acknowledgements, up to ten connections, refresh disconnects, and the Marketplace HTTP requirement.
Discriminate between Socket Mode and HTTP-based event delivery.
~7 min read · 7 practice questions ·
What the exam expects
- Choose Socket Mode or an HTTP Request URL from the requirement: local development, a firewall with no public endpoint, production reliability, or a Slack Marketplace listing.
- Set up Socket Mode: granular-permission app, toggle on, app-level
xapp-token withconnections:write,apps.connections.openfor a WebSocket URL. - Acknowledge every Socket Mode envelope by sending its
envelope_idback over the WebSocket. - Design for up to ten connections, payloads going to any one of them, and routine
warningandrefresh_requesteddisconnects. - Predict what toggling Socket Mode does to HTTP delivery on the same app.
Key terms: Socket Mode (receiving events and interactive payloads over a WebSocket instead of HTTP), Request URL (the public HTTPS endpoint Slack POSTs payloads to), app-level token (an xapp- token that represents the app across organizations), envelope (the Socket Mode wrapper with envelope_id and type), accepts_response_payload (whether the ack may carry a response payload).
Key facts
- Detail
- Up to 10 per app
- Detail
- Socket Mode apps are not currently allowed in the public Marketplace, so listed apps use HTTP
- Detail
- Socket Mode fully supported
- Detail
- Granular permissions only
- Detail
- App-level
xapp-token
- Detail
connections:writeon the app-level token
- Detail
- From
apps.connections.open, token in header
- Detail
- Events and interactivity only over WebSocket; Request URL kept for later
- Detail
- Send
envelope_idback over the socket
- Detail
- Not needed in Socket Mode; required per HTTP request
Sources for this section (5)
- When does Slack recommend Socket Mode over HTTP?
- Why do Socket Mode handlers skip request-signature checks?
- Which scope does the app-level token need to open a Socket Mode connection?
- What happens to HTTP delivery when Socket Mode is toggled on?
- Why must a custom client call `apps.connections.open` on every reconnect?
The questions are free to read. Answers with their sources and self-grading are included with the pack.
Keep reading with the Slack Developer pack
- Core concepts
- Exam traps
- Worked scenario
The pack includes:
- All 38 lessons of the Slack Developer guide, with reading progress
- Interactive decision walks and step-by-step sequence steppers
- Inline practice questions and one-click topic practice (7 questions for this lesson)
- An official source cited for every claim
- An AI tutor that answers from the guide
- Unlimited timed practice exams