Skip to content

how to use the rtm start? #2

@dcsan

Description

@dcsan

for the official API you can use

slack = new Slack(token, autoReconnect, autoMark)

I'm wondering if you've gone through the steps to get a websocket going after the API

SlackAPI.rtm.start(token, callback)

The url property contains a WebSocket Message Server URL. Connecting to this URL will initiate a Real Time Messaging session. These URLs are only valid for 30 seconds, so connect quickly!

about to start looking into that but asking here first!

Meteor.startup ->
  if Meteor.isServer
    slack = SlackAPI.rtm.start(token, startCb)

startCb = (err, res) ->
  console.log("slack.start", err, res)
  if err
    console.error("cant start slack.rtm")
  else
    slack = res

   # do something with it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions