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

Store access token, scope, incoming webhook info, etc. #66

Closed
dblock opened this issue Aug 20, 2017 · 0 comments
Closed

Store access token, scope, incoming webhook info, etc. #66

dblock opened this issue Aug 20, 2017 · 0 comments

Comments

@dblock
Copy link
Collaborator

dblock commented Aug 20, 2017

See dblock/slack-sup@3a497b4, there're two tokens returned via OAuth, one for the bot user and the other that has other requested oauth permissions. We need to store both in order to provide a token with other scopes than default bot scope.

https://api.slack.com/docs/oauth

{
    "access_token": "xoxp-XXXXXXXX-XXXXXXXX-XXXXX",
    "scope": "incoming-webhook,commands,bot",
    "team_name": "Team Installing Your Hook",
    "team_id": "XXXXXXXXXX",
    "incoming_webhook": {
        "url": "https://hooks.slack.com/TXXXXX/BXXXXX/XXXXXXXXXX",
        "channel": "#channel-it-will-post-to",
        "configuration_url": "https://teamname.slack.com/services/BXXXXX"
    },
    "bot":{
        "bot_user_id":"UTTTTTTTTTTR",
        "bot_access_token":"xoxb-XXXXXXXXXXXX-TTTTTTTTTTTTTT"
    }
}
@dblock dblock changed the title Store the access token with custom profile permission requests Store access token, scope, incoming webhook info, etc. Aug 21, 2017
dblock added a commit to dblock/slack-ruby-bot-server that referenced this issue Aug 30, 2017
@dblock dblock closed this as completed in 9e9e605 Aug 30, 2017
dblock added a commit that referenced this issue Aug 30, 2017
Documented obtaining access_token, closes #66. [ci skip]
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

1 participant