Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checking Access Token Scopes #1076

Open
7ail opened this issue Jun 8, 2022 · 1 comment
Open

Checking Access Token Scopes #1076

7ail opened this issue Jun 8, 2022 · 1 comment

Comments

@7ail
Copy link
Contributor

7ail commented Jun 8, 2022

We have a use-case where we would like to query for the access scopes that are tied to an access token.

Slack does not currently provide any endpoints to service this need, instead they've included the scopes in the response header of every request made to slack under the X-Oauth-Scopes banner

Looking through the code, we seem to be only utilising header in the response here.

Do we have any strong opinions against returning the header for consumers further up the chain?

Having an opinionated approach on which endpoint we should use to service this use-case does not seem like the best thing to do since this requirement can be serviced by any Slack API endpoint.

However, thoughts on exposing this in a generic Do method to allow for customisation? (Haven't looked further in the code to see if this is possible, just spitballing.)

@kanata2
Copy link
Member

kanata2 commented Sep 11, 2022

It would be nice to be able to check X-Oauth-Scopes in some way.
I would like to study how to provide this as a slack-go.

Note:

When using the Slack API you can check the HTTP headers to see what OAuth scopes you have, and what the API method accepts.
https://api.slack.com/legacy/oauth-scopes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants