Skip to content

Integrations

Slack

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

Connect the application’s users to Slack workspaces for messaging, channel management, file sharing, and notifications.

Alter’s Slack adapter requests Bot Token Scopes through Slack’s OAuth scope parameter and stores the resulting bot token (xoxb-... without token rotation, xoxe.xoxb-... with rotation). The end user approves the workspace installation, but API calls act as the Slack app bot — Alter does not request user_scope or use a user token for this provider.

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

Managed Slack methods cover the 80 Web API methods in Slack’s published OpenAPI description that a bot token can call, corrected to Slack’s current method reference, in both SDKs. Each operation’s page in the operation reference lists the bot-token scopes Slack documents for it; where it lists several, any one suffices. The scope list on this page offers every scope a published operation needs. Methods Slack documents for user tokens only (the admin.* family, search.messages, stars.* and others) are not published, because this connection holds a bot token. A workspace can also store its own Slack app’s bot token as a managed secret; the same methods and policy apply.

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)
  • Do not add them only under User Token Scopes; Alter’s Slack consent URL requests bot scopes

Enable external workspace installation when needed

A newly created Slack app can only be installed in its associated development workspace. If users from other workspaces must authorize it, complete Slack’s distribution checklist and enable Manage Distribution → Activate Public Distribution. An unlisted distributed app is sufficient for private pilots; Slack Marketplace review is a separate publication step. See Slack’s app-distribution guide.

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

Slack opens directly in custom-credential mode. Enter:

  • Client ID: Paste the Slack Client ID
  • Client Secret: Paste the 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:

With the default chat:write scope, first invite the Slack app to the destination channel with /invite @<Slack app name>. A channel returned by conversations.list is not necessarily one the bot has joined. Select the broader chat:write.public scope only when the app should be able to post to any public channel without an invite.

chat:write.public depends on chat:write. The portal selects the prerequisite automatically and removes the dependent scope if the prerequisite is removed; the CLI and backend reject an invalid combination.

from alter_sdk import PendingApproval
from alter_sdk import App, HttpMethod
async with App(
api_key="alter_key_...",
caller="my-agent",
) as alter_app:
response = await alter_app.proxy_request(
HttpMethod.POST,
"https://slack.com/api/chat.postMessage",
grant_id=grant_id,
json={"channel": "#general", "text": "Hello from Alter Vault!"},
)
if isinstance(response, PendingApproval):
for gate in response.gates:
print("Approval required:", gate.approval_url)
response = await alter_app.await_approval(response.approval_id)
data = response.body_json()
if data.get("ok"):
print("Message sent!")
else:
print(f"Error: {data.get('error')}")
ScopeDescription
channels:readBot token: list public channels; listing does not mean the bot has joined them
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 the app
groups:historyView messages and other content in private channels the app has been added to
im:historyView messages and other content in direct messages the app has been added to
mpim:historyView messages and other content in group direct messages the app has been added to
users.profile:readView profile details about people in a workspace
usergroups:readView user groups in a workspace
pins:readView pinned content in channels and conversations the app has been added to
emoji:readView custom emoji in a workspace
dnd:readView Do Not Disturb settings for people in a workspace
calls:readView information about ongoing and past calls
remote_files:readView remote files added by the app in a workspace
ScopeDescription
chat:writeBot token: post only where the Slack app is already a member
chat:write.publicBot token: post in public channels without joining first; requires chat:write
chat:write.customizeBot token: send messages with a customized username and avatar; requires chat:write
channels:manageManage public channels and create new ones
channels:joinJoin public channels in a workspace
groups:writeManage private channels that the 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
channels:write.invitesInvite members to public channels
groups:write.invitesInvite members to private channels
channels:write.topicSet the description of public channels
groups:write.topicSet the description of private channels
im:write.topicSet the description in direct messages
mpim:write.topicSet the description in group direct messages
pins:writeAdd and remove pinned messages and files
usergroups:writeCreate and manage user groups
users:writeSet presence for the Slack app
calls:writeStart and manage calls in a workspace
links:writeShow previews of URLs in messages
remote_files:writeAdd, edit, and delete remote files
remote_files:shareShare remote files into channels
ScopeDescription
commandsAdd shortcuts and slash commands
incoming-webhookPost messages to specific channels via incoming webhooks
tokens.basicMap local user IDs to global user IDs in an Enterprise organization (migration.exchange)
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-... without rotation, xoxe.xoxb-... with rotation). These act on behalf of the app, not the user.
  • Slack returns HTTP 200 for API-level failures. Always require ok: true; ok: false with error: "not_in_channel" means the bot must be invited or granted chat:write.public.
  • Non-rotation xoxb-... access tokens do not expire. Rotation xoxe.xoxb-... access tokens expire after 12 hours; 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.
  • Disconnecting in Alter (revoking the connection’s last grant, in the Wallet or with revoke_grant) revokes the bot token at Slack. Slack then deactivates the app’s bot user and removes it from every channel it belonged to; the app stays installed in the workspace (auth.revoke). After a reconnect, invite the bot to its channels again. The bot token belongs to the workspace’s installation, so Alter skips the revocation while another connection in Alter holds the same workspace under the same client ID.
  • 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 pathNotes
api_testreadGET/api/api.test—
auth_testreadGET/api/auth.test—
bots_inforeadGET/api/bots.info—
calls_inforeadGET/api/calls.info—
chat_getPermalinkreadGET/api/chat.getPermalink—
chat_scheduledMessages_listreadGET/api/chat.scheduledMessages.list—
conversations_historyreadGET/api/conversations.history—
conversations_inforeadGET/api/conversations.info—
conversations_listreadGET/api/conversations.list—
conversations_membersreadGET/api/conversations.members—
conversations_repliesreadGET/api/conversations.replies—
dnd_inforeadGET/api/dnd.info—
dnd_teamInforeadGET/api/dnd.teamInfo—
emoji_listreadGET/api/emoji.list—
files_inforeadGET/api/files.info—
files_listreadGET/api/files.list—
files_remote_inforeadGET/api/files.remote.info—
files_remote_listreadGET/api/files.remote.list—
files_remote_sharesend, writeGET/api/files.remote.share—
migration_exchangereadGET/api/migration.exchange—
pins_listreadGET/api/pins.list—
reactions_getreadGET/api/reactions.get—
reactions_listreadGET/api/reactions.list—
search_messagesreadGET/api/search.messagesRetained policy identity: in Slack’s description, but it needs a user token this connection never holds, so the managed contract does not publish it
team_inforeadGET/api/team.info—
team_profile_getreadGET/api/team.profile.get—
usergroups_listreadGET/api/usergroups.list—
usergroups_users_listreadGET/api/usergroups.users.list—
users_conversationsreadGET/api/users.conversations—
users_getPresencereadGET/api/users.getPresence—
users_inforeadGET/api/users.info—
users_listreadGET/api/users.list—
users_lookupByEmailreadGET/api/users.lookupByEmail—
users_profile_getreadGET/api/users.profile.get—
calls_addwritePOST/api/calls.add—
calls_endwritePOST/api/calls.end—
calls_participants_addwritePOST/api/calls.participants.add—
calls_participants_removewritePOST/api/calls.participants.remove—
calls_updatewritePOST/api/calls.update—
chat_deletedeletePOST/api/chat.delete—
chat_deleteScheduledMessagedeletePOST/api/chat.deleteScheduledMessage—
chat_meMessagesend, writePOST/api/chat.meMessage—
chat_postEphemeralsend, writePOST/api/chat.postEphemeral—
chat_postMessagesend, writePOST/api/chat.postMessage—
chat_scheduleMessagesend, writePOST/api/chat.scheduleMessage—
chat_unfurlsend, writePOST/api/chat.unfurl—
chat_updatesend, writePOST/api/chat.update—
conversations_archiveadmin, send, writePOST/api/conversations.archive—
conversations_closewritePOST/api/conversations.close—
conversations_createwritePOST/api/conversations.create—
conversations_inviteadmin, send, writePOST/api/conversations.invite—
conversations_joinadmin, send, writePOST/api/conversations.join—
conversations_kickadmin, delete, sendPOST/api/conversations.kick—
conversations_leaveadmin, delete, sendPOST/api/conversations.leave—
conversations_markwritePOST/api/conversations.mark—
conversations_openwritePOST/api/conversations.open—
conversations_renamesend, writePOST/api/conversations.rename—
conversations_setPurposesend, writePOST/api/conversations.setPurpose—
conversations_setTopicsend, writePOST/api/conversations.setTopic—
conversations_unarchiveadmin, send, writePOST/api/conversations.unarchive—
dialog_opensendPOST/api/dialog.open—
files_comments_deletedeletePOST/api/files.comments.delete—
files_deletedeletePOST/api/files.delete—
files_remote_addwritePOST/api/files.remote.add—
files_remote_removedeletePOST/api/files.remote.remove—
files_remote_updatewritePOST/api/files.remote.update—
files_revokePublicURLadmin, deletePOST/api/files.revokePublicURL—
files_uploadsend, writePOST/api/files.uploadRetained policy identity: Slack retired files.upload on 2025-11-12, so the managed contract does not publish it; cataloged so existing rules keep matching a raw call
pins_addsend, writePOST/api/pins.add—
pins_removedelete, sendPOST/api/pins.remove—
reactions_addwritePOST/api/reactions.add—
reactions_removedeletePOST/api/reactions.remove—
usergroups_createadmin, writePOST/api/usergroups.create—
usergroups_disableadmin, writePOST/api/usergroups.disable—
usergroups_enableadmin, writePOST/api/usergroups.enable—
usergroups_updateadmin, writePOST/api/usergroups.update—
usergroups_users_updateadmin, delete, send, writePOST/api/usergroups.users.update—
users_setPresencewritePOST/api/users.setPresence—
views_opensend, writePOST/api/views.open—
views_publishsend, writePOST/api/views.publish—
views_pushsend, writePOST/api/views.push—
views_updatesend, writePOST/api/views.update—
apps_manifest_createadminGET/api/apps.manifest.createrefused by default: hands the caller a provider credential, or revokes the connection’s own (a credential_minting rule can allow it); served by the provider but absent from its published spec
apps_uninstalladminGET/api/apps.uninstallrefused by default: hands the caller a provider credential, or revokes the connection’s own (a credential_minting rule can allow it); served by the provider but absent from its published spec
auth_revokeadminGET/api/auth.revokerefused by default: hands the caller a provider credential, or revokes the connection’s own (a credential_minting rule can allow it); served by the provider but absent from its published spec
oauth_accessadminGET/api/oauth.accessrefused by default: hands the caller a provider credential, or revokes the connection’s own (a credential_minting rule can allow it); Credential endpoint: cataloged only so the policy chain refuses it as credential minting; never published as an operation
oauth_tokenadminGET/api/oauth.tokenrefused by default: hands the caller a provider credential, or revokes the connection’s own (a credential_minting rule can allow it); Credential endpoint: cataloged only so the policy chain refuses it as credential minting; never published as an operation
oauth_v2_accessadminGET/api/oauth.v2.accessrefused by default: hands the caller a provider credential, or revokes the connection’s own (a credential_minting rule can allow it); Credential endpoint: cataloged only so the policy chain refuses it as credential minting; never published as an operation
oauth_v2_exchangeadminGET/api/oauth.v2.exchangerefused by default: hands the caller a provider credential, or revokes the connection’s own (a credential_minting rule can allow it); served by the provider but absent from its published spec
openid_connect_tokenadminGET/api/openid.connect.tokenrefused by default: hands the caller a provider credential, or revokes the connection’s own (a credential_minting rule can allow it); served by the provider but absent from its published spec
tooling_tokens_rotateadminGET/api/tooling.tokens.rotaterefused by default: hands the caller a provider credential, or revokes the connection’s own (a credential_minting rule can allow it); served by the provider but absent from its published spec
apps_manifest_create_postadminPOST/api/apps.manifest.createrefused by default: hands the caller a provider credential, or revokes the connection’s own (a credential_minting rule can allow it); served by the provider but absent from its published spec
apps_uninstall_postadminPOST/api/apps.uninstallrefused by default: hands the caller a provider credential, or revokes the connection’s own (a credential_minting rule can allow it); served by the provider but absent from its published spec
auth_revoke_postadminPOST/api/auth.revokerefused by default: hands the caller a provider credential, or revokes the connection’s own (a credential_minting rule can allow it); served by the provider but absent from its published spec
oauth_access_postadminPOST/api/oauth.accessrefused by default: hands the caller a provider credential, or revokes the connection’s own (a credential_minting rule can allow it); Credential endpoint: cataloged only so the policy chain refuses it as credential minting; never published as an operation
oauth_token_postadminPOST/api/oauth.tokenrefused by default: hands the caller a provider credential, or revokes the connection’s own (a credential_minting rule can allow it); Credential endpoint: cataloged only so the policy chain refuses it as credential minting; never published as an operation
oauth_v2_access_postadminPOST/api/oauth.v2.accessrefused by default: hands the caller a provider credential, or revokes the connection’s own (a credential_minting rule can allow it); Credential endpoint: cataloged only so the policy chain refuses it as credential minting; never published as an operation
oauth_v2_exchange_postadminPOST/api/oauth.v2.exchangerefused by default: hands the caller a provider credential, or revokes the connection’s own (a credential_minting rule can allow it); served by the provider but absent from its published spec
openid_connect_token_postadminPOST/api/openid.connect.tokenrefused by default: hands the caller a provider credential, or revokes the connection’s own (a credential_minting rule can allow it); served by the provider but absent from its published spec
tooling_tokens_rotate_postadminPOST/api/tooling.tokens.rotaterefused by default: hands the caller a provider credential, or revokes the connection’s own (a credential_minting rule can allow it); served by the provider but absent from its published spec

Report an issue with this page

Necessary

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

Always active

Analytics

Helps us understand how our website, product, and documentation are used.

Performance diagnostics

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

Advertising

Shares visits and sign-ups with Meta, Reddit, and X so we can measure which of our ads work.

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