Skip to content
This repository has been archived by the owner on Aug 14, 2022. It is now read-only.

Latest commit

 

History

History
82 lines (50 loc) · 1.27 KB

README.md

File metadata and controls

82 lines (50 loc) · 1.27 KB

slack-file-download

A script that download files uploaded to Slack.

Requirements

  • Ruby 2.7+

Installation

e.g.

$ bundle config set path vendor/bundle --local
$ bundle config set parallel 4 --local
$ bundle install

Usage

Create a Slack app and setting it

1. Create a Slack app

2. Add scope

  1. Basic Information
  2. Permissions
  3. Scopes
  4. Add an OAuth Scope
  5. Add files:read

3. Install App to Workspace

4. Allow it

5. Get an OAuth Access Token

Setup .env

Create .env and set ACCESS_TOKEN.

ACCESS_TOKEN=xxxxx

Execute a command

$ bundle exec ruby download.rb

Environment variables

ACCESS_TOKEN          - OAuth Access Token of Slack
DOWNLOAD_DIR          - Donwload directory (default: download)
WAIT_SECONDS_ON_ERROR - Wait seconds on error (default: 10)

Author

dounokouno

License

MIT License

References