Skip to content

Latest commit

 

History

History
127 lines (87 loc) · 3.37 KB

README.rst

File metadata and controls

127 lines (87 loc) · 3.37 KB

Slack Dumper

Purpose: dump Slack messages, users and files using browser token and cookie.

Typical use scenarios:

  • archive your private conversations from Slack when the administrator does not allow you to install applications OR you don't want to use potentially privacy-violating third-party tools,
  • archive channels from Slack when you're on a free "no archive" subscription, so you don't lose valuable knowledge in those channels.
  • create a Slack Export archive without admin access.

There a three modes of operation (more on this in User Guide) :

  1. List users/channels
  2. Dumping messages and threads
  3. Creating a Slack Export.

Slackdump accepts two types of input (see Dumping Conversations section):

  1. the URL/link of the channel or thread, OR
  2. the ID of the channel.

Please see the User Guide.

Download:

go get github.com/rusq/slackdump/v2

Add the following line at the end of your project's go.mod file:

replace github.com/slack-go/slack => github.com/rusq/slack v0.10.4

This is required, as Slackdump relies on custom autorization scheme that uses cookies, and those functions are simply not in the original library.

Use:

import (
  "github.com/rusq/slackdump/v2"
  "github.com/rusq/slackdump/v2/auth"
)

func main() {
  provider, err := auth.NewValueAuth("xoxc-...", "xoxd-...")
  if err != nil {
      log.Print(err)
      return
  }
  sd, err := New(context.Background(), provider)
  if err != nil {
      log.Print(err)
      return
  }
  _ = sd
}

See go ref

Q:Do I need to create a Slack application?
A:No, you don't. Just run the application and EZ-Login 3000 will take care of the authentication or, alternatively, grab that token and cookie from the browser Slack session. See User Guide.
Q:I'm getting "invalid_auth" error
A:Go get the new Cookie from the browser and Token as well.

Messages that were conveyed with the donations:

  • 25/01/2022: Stay away from TheSignChef.com, ya hear, they don't pay what they owe to their employees.