Slack RTM API

The Slack Real Time Messaging (RTM) API lets an app open a WebSocket connection to Slack and receive a live stream of JSON events from a workspacesuch as new messages, edits, reactions, user presence and typing indicators, channel joins, and moreso you can build lowlatency, interactive bots and clients. Apps typically use the RTM stream for listening and the Web API for performing actions like posting or updating messages.

OpenAPI Specification

slack-rtm-openapi.yml Raw ↑
openapi: 3.1.0
info:
  version: "1.0"
  title: Slack RTM API
  description: "The Slack Real Time Messaging (RTM) API lets an app open a WebSocket connection to Slack and receive a live stream of JSON events from a workspace\x14such as new messages, edits, reactions,
    user presence and typing indicators, channel joins, and more\x14so you can build low\x11latency, interactive bots and clients. Apps typically use the RTM stream for listening and the Web API for performing
    actions like posting or updating messages. You start by calling rtm.connect (or rtm.start, historically) to obtain a WebSocket URL, then maintain the socket to process events as they happen. RTM is
    now considered legacy; for new apps Slack recommends using the Events API with the Web API, or Socket Mode if you can\x19t expose a public HTTP endpoint."
paths:
  /rtm.connect:
    get:
      tags:
      - Connect
      - Get
      description: Starts a Real Time Messaging session.
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/rtm.connect
      operationId: getRtmConnect
      parameters:
      - name: token
        in: query
        description: 'Authentication token. Requires scope: `rtm:stream`'
        required: true
        schema:
          type: string
      - name: batch_presence_aware
        in: query
        description: >-
          Batch presence deliveries via subscription. Enabling changes the
          shape of `presence_change` events. See [batch
          presence](/docs/presence-and-status#batching).
        schema:
          type: boolean
      - name: presence_sub
        in: query
        description: >-
          Only deliver presence events when requested by subscription. See
          [presence subscriptions](/docs/presence-and-status#subscriptions).
        schema:
          type: boolean
      responses:
        '200':
          description: Typical success response
          content:
            application/json:
              schema:
                title: rtm.connect schema
                required:
                - ok
                - self
                - team
                - url
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_true'
                  self:
                    type: object
                    additionalProperties: false
                  team:
                    type: object
                    additionalProperties: false
                  url:
                    type: string
                    format: uri
                additionalProperties: false
                description: Schema for successful response from rtm.connect method
              example:
                ok: true
                self:
                  id: U4X318ZMZ
                  name: robotoverlord
                team:
                  domain: slackdemo
                  id: T2U81E2FP
                  name: SlackDemo
                url: wss://...
        default:
          description: Typical error response
          content:
            application/json:
              schema:
                title: rtm.connect error schema
                required:
                - error
                - ok
                type: object
                properties:
                  callstack:
                    type: string
                    description: 'Note: PHP callstack is only visible in dev/qa'
                  error:
                    type: string
                    enum:
                    - not_authed
                    - invalid_auth
                    - account_inactive
                    - token_revoked
                    - no_permission
                    - invalid_arg_name
                    - invalid_array_arg
                    - invalid_charset
                    - invalid_form_data
                    - invalid_post_type
                    - missing_post_type
                    - team_added_to_org
                    - invalid_json
                    - json_not_object
                    - request_timeout
                    - upgrade_required
                    - fatal_error
                  ok:
                    $ref: '#/components/schemas/defs_ok_false'
                additionalProperties: false
                description: Schema for error response from rtm.connect method
              example:
                error: invalid_auth
                ok: false
      security:
      - slackAuth:
        - rtm:stream
      summary: Slack Get Rtm Connect
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas: {}
tags:
- name: Connect
- name: Get