Slack Oauth/Authorize API Call

前端 未结 1 756
无人共我
无人共我 2021-01-26 18:54

I\'m new to OAuth (and the Slack API) and have a question regarding Step 1 of Slack\'s OAuth Flow.

It says \"Your web or mobile app should redirect users to the followin

相关标签:
1条回答
  • 2021-01-26 19:16

    You should check out the Slack button docs.

    There you will find an example for your slackapp, something like:

    <a href="https://slack.com/oauth/authorize?scope=incoming-webhook&client_id=CLIENT_ID">
       <img alt="Add to Slack" height="40" width="139" 
       src="https://platform.slack-edge.com/img/add_to_slack.png" />
    </a>
    

    This button asks for authorization for a slackapp that includes incoming webhooks, you can add more features needed inside scope separating them by commas. scope=incoming-webhook,commands,bot,channels:read

    As of your tutorial link, when it says you should link them to https://oauth2server.com/auth?response_type=code&client_id=CLIENT_ID&redirect_uri=REDIRECT_URI&scope=photos

    It is refering to wrap that into a button for the user:

    <a href="https://oauth2server.com/auth?response_type=code&client_id=CLIENT_ID&redirect_uri=REDIRECT_URI&scope=photos">
       Auth Button
    </a>
    

    Hope this helps clarify the usage of /oauth/authorize

    0 讨论(0)
提交回复
热议问题