Skip to content

Reference

Slack

Set up Slack OAuth for messaging, channels, and workspace access

Connect your users to Slack workspaces for messaging, channel management, file sharing, and notifications.

PropertyValue
Provider IDslack
CategoryCommunication
PKCENot supported
Token refreshAutomatic (rolling - new token each refresh)
Access token lifetime12 hours
Redirect URIShown in Developer Portal

Go to Slack API

Navigate to api.slack.com/apps and click Create New App.

Choose creation method

Select From scratch. Enter:

  • App Name: The application name (e.g., “My App Integration”)
  • Pick a workspace: Select a development workspace for testing
  • Click Create App

Get credentials

Go to Settings > Basic Information:

  • Scroll to App Credentials
  • Copy the Client ID and Client Secret

Configure OAuth redirect

Go to OAuth & Permissions in the sidebar:

  • Under Redirect URLs, click Add New Redirect URL
  • Copy the Redirect URI from the Developer Portal
  • Click Save URLs

Enable token rotation

Go to OAuth & Permissions:

  • Scroll to Token Rotation
  • Click Opt in to token rotation

This enables refresh tokens, which Alter Vault uses to automatically keep access tokens fresh.

Add bot scopes

Go to OAuth & Permissions:

  • Scroll to Scopes > Bot Token Scopes
  • Add the scopes the application needs (see Available Scopes below)

Open the Developer Portal

Go to portal.alterauth.com and navigate to the application.

Add Slack provider

Go to OAuth Providers > Add Provider > Slack.

Enter credentials

  • Client ID: Paste your Slack Client ID
  • Client Secret: Paste your Slack Client Secret

Select scopes

Choose the bot token scopes the application needs.

Save

Click Save. The provider is now active.

After a user connects via Alter Connect, use the returned grant_id to make API calls:

from alter_sdk import App, HttpMethod
async with App(
api_key="alter_key_...",
caller="my-agent",
) as alter_app:
response = await alter_app.request(
HttpMethod.POST,
"https://slack.com/api/chat.postMessage",
grant_id=grant_id,
json={"channel": "#general", "text": "Hello from Alter Vault!"},
)
data = response.json()
if data.get("ok"):
print("Message sent!")
else:
print(f"Error: {data.get('error')}")
ScopeDescription
channels:readView basic information about public channels in a workspace
channels:historyView messages and other content in public channels
groups:readView basic information about private channels
im:readView basic information about direct messages
mpim:readView basic information about group direct messages
users:readView people in a workspace
users:read.emailView email addresses of people in this workspace
team:readView the name, email domain, and icon for workspaces
files:readView files shared in channels and conversations
reactions:readView emoji reactions in channels and conversations
app_mentions:readView messages that directly mention your app
ScopeDescription
chat:writePost messages in approved channels & conversations
chat:write.publicSend messages to channels @your_slack_app isn’t a member of
chat:write.customizeSend messages with a customized username and avatar
channels:manageManage public channels and create new ones
channels:joinJoin public channels in a workspace
groups:writeManage private channels that your app has been added to
im:writeStart direct messages with people
mpim:writeStart group direct messages with people
files:writeUpload, edit, and delete files
reactions:writeAdd and remove emoji reactions
ScopeDescription
commandsAdd shortcuts and slash commands
incoming-webhookPost messages to specific channels via incoming webhooks
Use CaseMethodURL
Send a messagePOSThttps://slack.com/api/chat.postMessage
List channelsGEThttps://slack.com/api/conversations.list
Get channel historyGEThttps://slack.com/api/conversations.history
List usersGEThttps://slack.com/api/users.list
Get file upload URLPOSThttps://slack.com/api/files.getUploadURLExternal
Complete file uploadPOSThttps://slack.com/api/files.completeUploadExternal
Add a reactionPOSThttps://slack.com/api/reactions.add
  • Slack uses bot tokens (xoxb-...) by default. These act on behalf of the app, not the user.
  • Access tokens expire every 12 hours. With token rotation enabled, Alter Vault automatically refreshes them using the rolling refresh token.
  • Slack scopes are comma-separated (unlike most providers which use spaces). Alter Vault handles this automatically.
  • The Slack API always returns HTTP 200, even on errors. Check the ok field in the response body to determine success or failure.
  • See the Slack OAuth installation guide for details.

Alter policy rules can target these attested operations and families for operation-level and parameter-aware controls.

Operation IDFamiliesMethodProvider path
chat_postMessagesendPOST/api/chat.postMessage
chat_postEphemeralsendPOST/api/chat.postEphemeral
chat_scheduleMessagesendPOST/api/chat.scheduleMessage
chat_meMessagesendPOST/api/chat.meMessage
chat_updatewritePOST/api/chat.update
chat_deletedeletePOST/api/chat.delete
chat_deleteScheduledMessagedeletePOST/api/chat.deleteScheduledMessage
chat_getPermalinkreadGET/api/chat.getPermalink
chat_scheduledMessages_listreadGET/api/chat.scheduledMessages.list
conversations_createwritePOST/api/conversations.create
conversations_archivewritePOST/api/conversations.archive
conversations_renamewritePOST/api/conversations.rename
conversations_joinwritePOST/api/conversations.join
conversations_leavewritePOST/api/conversations.leave
conversations_openwritePOST/api/conversations.open
conversations_inviteadminPOST/api/conversations.invite
conversations_kickadminPOST/api/conversations.kick
conversations_listreadGET/api/conversations.list
conversations_historyreadGET/api/conversations.history
users_listreadGET/api/users.list
users_inforeadGET/api/users.info
users_lookupByEmailreadGET/api/users.lookupByEmail
files_uploadwritePOST/api/files.upload
files_deletedeletePOST/api/files.delete
reactions_addwritePOST/api/reactions.add
reactions_removewritePOST/api/reactions.remove
pins_addwritePOST/api/pins.add
pins_listreadGET/api/pins.list
search_messagesreadGET/api/search.messages
auth_testreadGET/api/auth.test
team_inforeadGET/api/team.info

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.