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

Given a private url from slack, this code will return it's public link.

License

Notifications You must be signed in to change notification settings

Pragmateam/get-public-url-from-slack

Repository files navigation

get-public-url-from-slack

travis license codeclimate score

Given a private url from slack, this code will return it's public link.

More about Slack Shared Public Url API here

Setup

$ make install

Running

Ensure you have a valid Slack API Token on your environment variable set:

export SLACK_API_TOKEN=****-**********-************-************-*************

Then follow the steps below:

  1. Upload a new image on your slack.
  2. Get it's private url (probably with the mouse right button)
  3. Run:
$ make run url={PRIVATE_URL}

Testing

$ make test

Deploy to AWS Lambda + API Gateway

Assuming you have your AWS credentials in place you can just call make deploy as follows:

$ make deploy

Contributing

There are many ways to contribute, such as fixing opened issues, creating them or suggesting new ideas. Either way will be very appreciated.

License

get-public-url-from-slack is released under the MIT License.