Last active
December 4, 2020 13:15
-
-
Save one-data-cookie/b45cdc6cceb673d785c4df914a87208f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests as rq | |
import pandas as pd | |
msg_url = 'https://slack.com/api/conversations.history' | |
msg_headers = {'content-type': 'application/x-www-form-urlencoded'} | |
msg_params = { | |
'token': 'xoxp-XXXXXXXXXXXX-XXXXXXXXXXXX-XXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', | |
'channel': 'CXXXXXXXX', | |
'limit': 1000 | |
} | |
msg_res = rq.get(url=msg_url, headers=msg_headers, params=msg_params) | |
msg = [i['ts'] for i in msg_res.json()['messages']] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment