Open in a web browser: https://slack.com/oauth/authorize?scope=bot&client_id=12345.67890
- Use Client ID from App Credentials.
- Use
bot
for scope.
After authorization, it'll redirect to the configured URI with the code
param:
https://example.com/?code=12345.67890.1a2b3c4d5e6f7a8b9c0d&state=
This is only valid for 10 minutes.
GET: https://slack.com/api/oauth.access?client_id=12345.67890&client_secret=1a2b3c4d5e6f7a8b9c0d&code=12345.67890.1a2b3c4d5e6f7a8b9c0d
- Use Client ID and Client Secret from App Credentials.
- Use
code
from previous step.
Access token will be provided in the JSON response:
{
"ok":true,
"access_token":"xoxp-123-456-789-aa11bb22cc",
"scope":"identify,bot",
"user_id":"U012ABC",
"team_name":"Team",
"team_id":"T012ABC",
"bot":{
"bot_user_id":"U456DEF",
"bot_access_token":"xoxb-123-456-789-xx77yy88zz"
}
}