Elixir-Slack icon indicating copy to clipboard operation
Elixir-Slack copied to clipboard

Slack API returned an error invalid_auth

Open vishal-h opened this issue 7 months ago • 0 comments

Following the example in https://github.com/BlakeWilliams/Elixir-Slack#real-time-messaging-rtm-bot-usage

Slack.Bot.start_link(SlackRtm, [], "xoxb-some-token") gives the error

{:error,  "Slack API returned an error `invalid_auth.\n Response: {\"ok\":false,\"error\":\"invalid_auth\"}"}

The same token works fine when tested with kino_slack or

POST https://slack.com/api/chat.postMessage
Content-type: application/json
Authorization: Bearer xoxb-some-token

{
  "channel": "some-channel",
  "text": "Hello world :handshake:"
}

vishal-h avatar Dec 03 '23 04:12 vishal-h