Skip to content

Conversation

christofdamian
Copy link

Slack stopped allowing tokens in query strings.
See
https://api.slack.com/changelog/2020-11-no-more-tokens-in-querystrings-for-newly-created-apps

This moves the token handling into the request sessions object, which also
cleans up the code a bit.

Fixes #209

Caveat: I have no idea what I am doing and the code is failing in a different area for me now

@coveralls
Copy link

coveralls commented Mar 23, 2021

Coverage Status

Coverage increased (+0.1%) to 75.883% when pulling 3e0f48a on christofdamian:session-tokens into d9c2cf8 on randsleadershipslack:master.

Slack stopped allowing tokens in query strings.
See
https://api.slack.com/changelog/2020-11-no-more-tokens-in-querystrings-for-newly-created-apps

This moves the token handling into the request sessions object, which also
cleans up the code a bit.

Fixes randsleadershipslack#209
christofdamian added a commit to christofdamian/destalinator that referenced this pull request Apr 14, 2021
Allow passing both the bot and user token to the scripts via the environment
variables DESTALINATOR_API_BOT_TOKEN and DESTALINATOR_API_USER_TOKEN. They have
different permissions and the bot token is only used to post messags, all other
calls use the user token. Fixes randsleadershipslack#194.

This also includes randsleadershipslack#210 and fixes randsleadershipslack#209 by moving the tokens into the header
instead of using query parameters.

Don't pass `as_user` to Slack, as this has been removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slack authentication tokens in query parameters don't work any more.

3 participants