chrisgavin / slacktoken

A library for retrieving a Slack user token from an authenticated Slack application.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

slacktoken

A library for retrieving a Slack user token and cookies from an authenticated Slack application.

Installation

Linux Prerequisites

To access the secret store which is used to decrypt cookies you will need to install some native dependencies.

$ sudo apt-get install libgirepository1.0-dev

Library Installation

$ python3 -m pip install slacktoken

CLI Usage

$ python3 -m slacktoken get --workspace my-workspace
xoxs-12345678910-...
d=...

Library Usage

>>> import slacktoken.token
>>> authentication_information = slacktoken.token.get("my-workspace")
>>> authentication_information.token
'xoxs-12345678910-...'
>>> authentication_information.cookies
{'d': '...'}

About

A library for retrieving a Slack user token from an authenticated Slack application.


Languages

Language:Python 97.3%Language:Shell 2.1%Language:PowerShell 0.6%