slack-ruby / slack-ruby-client

A Ruby and command-line client for the Slack Web, Real Time Messaging and Event APIs.
MIT License
1.21k stars 214 forks source link

Update docs to remove reference to legacy token #441

Closed duffn closed 1 year ago

duffn commented 1 year ago

This updates the documentation reference on legacy tokens. Following the newly linked guide, I was able to generate a new app and token and tested it successfully using both the library and CLI.

$ export SLACK_API_TOKEN=xoxb-mytoken
require 'slack-ruby-client'

Slack.configure do |config|
  config.token = ENV['SLACK_API_TOKEN']
end

client = Slack::Web::Client.new

client.chat_postMessage(channel: '#slack-ruby', text: 'Hello from library')
slack chat postMessage --text="hello from CLI" --channel="#slack-ruby"

Closes #372

dblock commented 1 year ago

Thank you!