Integrations
Slack
Set up Slack OAuth for messaging, channels, and workspace access
Overview
Section titled “Overview”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.
| Property | Value |
|---|---|
| Provider ID | slack |
| Category | Communication |
| PKCE | Not supported |
| Token refresh | Automatic (rolling - new token each refresh) |
| Access token lifetime | 12 hours |
| Redirect URI | Shown in Developer Portal |
Managed API
Section titled “Managed API”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.
Step 1: Create a Slack App
Section titled “Step 1: Create a Slack App”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.
Step 2: Add to Alter Vault
Section titled “Step 2: Add to Alter Vault”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.
Step 3: Test It
Section titled “Step 3: Test It”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 PendingApprovalfrom 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')}")Available Scopes
Section titled “Available Scopes”Reading
Section titled “Reading”| Scope | Description |
|---|---|
channels:read | Bot token: list public channels; listing does not mean the bot has joined them |
channels:history | View messages and other content in public channels |
groups:read | View basic information about private channels |
im:read | View basic information about direct messages |
mpim:read | View basic information about group direct messages |
users:read | View people in a workspace |
users:read.email | View email addresses of people in this workspace |
team:read | View the name, email domain, and icon for workspaces |
files:read | View files shared in channels and conversations |
reactions:read | View emoji reactions in channels and conversations |
app_mentions:read | View messages that directly mention the app |
groups:history | View messages and other content in private channels the app has been added to |
im:history | View messages and other content in direct messages the app has been added to |
mpim:history | View messages and other content in group direct messages the app has been added to |
users.profile:read | View profile details about people in a workspace |
usergroups:read | View user groups in a workspace |
pins:read | View pinned content in channels and conversations the app has been added to |
emoji:read | View custom emoji in a workspace |
dnd:read | View Do Not Disturb settings for people in a workspace |
calls:read | View information about ongoing and past calls |
remote_files:read | View remote files added by the app in a workspace |
Writing
Section titled “Writing”| Scope | Description |
|---|---|
chat:write | Bot token: post only where the Slack app is already a member |
chat:write.public | Bot token: post in public channels without joining first; requires chat:write |
chat:write.customize | Bot token: send messages with a customized username and avatar; requires chat:write |
channels:manage | Manage public channels and create new ones |
channels:join | Join public channels in a workspace |
groups:write | Manage private channels that the app has been added to |
im:write | Start direct messages with people |
mpim:write | Start group direct messages with people |
files:write | Upload, edit, and delete files |
reactions:write | Add and remove emoji reactions |
channels:write.invites | Invite members to public channels |
groups:write.invites | Invite members to private channels |
channels:write.topic | Set the description of public channels |
groups:write.topic | Set the description of private channels |
im:write.topic | Set the description in direct messages |
mpim:write.topic | Set the description in group direct messages |
pins:write | Add and remove pinned messages and files |
usergroups:write | Create and manage user groups |
users:write | Set presence for the Slack app |
calls:write | Start and manage calls in a workspace |
links:write | Show previews of URLs in messages |
remote_files:write | Add, edit, and delete remote files |
remote_files:share | Share remote files into channels |
| Scope | Description |
|---|---|
commands | Add shortcuts and slash commands |
incoming-webhook | Post messages to specific channels via incoming webhooks |
tokens.basic | Map local user IDs to global user IDs in an Enterprise organization (migration.exchange) |
Common API Endpoints
Section titled “Common API Endpoints”| Use Case | Method | URL |
|---|---|---|
| Send a message | POST | https://slack.com/api/chat.postMessage |
| List channels | GET | https://slack.com/api/conversations.list |
| Get channel history | GET | https://slack.com/api/conversations.history |
| List users | GET | https://slack.com/api/users.list |
| Get file upload URL | POST | https://slack.com/api/files.getUploadURLExternal |
| Complete file upload | POST | https://slack.com/api/files.completeUploadExternal |
| Add a reaction | POST | https://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: falsewitherror: "not_in_channel"means the bot must be invited or grantedchat:write.public. - Non-rotation
xoxb-...access tokens do not expire. Rotationxoxe.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.
Policy-cataloged operations
Section titled “Policy-cataloged operations”Alter policy rules can target these attested operations and families for operation-level and parameter-aware controls.
| Operation ID | Families | Method | Provider path | Notes |
|---|---|---|---|---|
api_test | read | GET | /api/api.test | — |
auth_test | read | GET | /api/auth.test | — |
bots_info | read | GET | /api/bots.info | — |
calls_info | read | GET | /api/calls.info | — |
chat_getPermalink | read | GET | /api/chat.getPermalink | — |
chat_scheduledMessages_list | read | GET | /api/chat.scheduledMessages.list | — |
conversations_history | read | GET | /api/conversations.history | — |
conversations_info | read | GET | /api/conversations.info | — |
conversations_list | read | GET | /api/conversations.list | — |
conversations_members | read | GET | /api/conversations.members | — |
conversations_replies | read | GET | /api/conversations.replies | — |
dnd_info | read | GET | /api/dnd.info | — |
dnd_teamInfo | read | GET | /api/dnd.teamInfo | — |
emoji_list | read | GET | /api/emoji.list | — |
files_info | read | GET | /api/files.info | — |
files_list | read | GET | /api/files.list | — |
files_remote_info | read | GET | /api/files.remote.info | — |
files_remote_list | read | GET | /api/files.remote.list | — |
files_remote_share | send, write | GET | /api/files.remote.share | — |
migration_exchange | read | GET | /api/migration.exchange | — |
pins_list | read | GET | /api/pins.list | — |
reactions_get | read | GET | /api/reactions.get | — |
reactions_list | read | GET | /api/reactions.list | — |
search_messages | read | GET | /api/search.messages | Retained 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_info | read | GET | /api/team.info | — |
team_profile_get | read | GET | /api/team.profile.get | — |
usergroups_list | read | GET | /api/usergroups.list | — |
usergroups_users_list | read | GET | /api/usergroups.users.list | — |
users_conversations | read | GET | /api/users.conversations | — |
users_getPresence | read | GET | /api/users.getPresence | — |
users_info | read | GET | /api/users.info | — |
users_list | read | GET | /api/users.list | — |
users_lookupByEmail | read | GET | /api/users.lookupByEmail | — |
users_profile_get | read | GET | /api/users.profile.get | — |
calls_add | write | POST | /api/calls.add | — |
calls_end | write | POST | /api/calls.end | — |
calls_participants_add | write | POST | /api/calls.participants.add | — |
calls_participants_remove | write | POST | /api/calls.participants.remove | — |
calls_update | write | POST | /api/calls.update | — |
chat_delete | delete | POST | /api/chat.delete | — |
chat_deleteScheduledMessage | delete | POST | /api/chat.deleteScheduledMessage | — |
chat_meMessage | send, write | POST | /api/chat.meMessage | — |
chat_postEphemeral | send, write | POST | /api/chat.postEphemeral | — |
chat_postMessage | send, write | POST | /api/chat.postMessage | — |
chat_scheduleMessage | send, write | POST | /api/chat.scheduleMessage | — |
chat_unfurl | send, write | POST | /api/chat.unfurl | — |
chat_update | send, write | POST | /api/chat.update | — |
conversations_archive | admin, send, write | POST | /api/conversations.archive | — |
conversations_close | write | POST | /api/conversations.close | — |
conversations_create | write | POST | /api/conversations.create | — |
conversations_invite | admin, send, write | POST | /api/conversations.invite | — |
conversations_join | admin, send, write | POST | /api/conversations.join | — |
conversations_kick | admin, delete, send | POST | /api/conversations.kick | — |
conversations_leave | admin, delete, send | POST | /api/conversations.leave | — |
conversations_mark | write | POST | /api/conversations.mark | — |
conversations_open | write | POST | /api/conversations.open | — |
conversations_rename | send, write | POST | /api/conversations.rename | — |
conversations_setPurpose | send, write | POST | /api/conversations.setPurpose | — |
conversations_setTopic | send, write | POST | /api/conversations.setTopic | — |
conversations_unarchive | admin, send, write | POST | /api/conversations.unarchive | — |
dialog_open | send | POST | /api/dialog.open | — |
files_comments_delete | delete | POST | /api/files.comments.delete | — |
files_delete | delete | POST | /api/files.delete | — |
files_remote_add | write | POST | /api/files.remote.add | — |
files_remote_remove | delete | POST | /api/files.remote.remove | — |
files_remote_update | write | POST | /api/files.remote.update | — |
files_revokePublicURL | admin, delete | POST | /api/files.revokePublicURL | — |
files_upload | send, write | POST | /api/files.upload | Retained 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_add | send, write | POST | /api/pins.add | — |
pins_remove | delete, send | POST | /api/pins.remove | — |
reactions_add | write | POST | /api/reactions.add | — |
reactions_remove | delete | POST | /api/reactions.remove | — |
usergroups_create | admin, write | POST | /api/usergroups.create | — |
usergroups_disable | admin, write | POST | /api/usergroups.disable | — |
usergroups_enable | admin, write | POST | /api/usergroups.enable | — |
usergroups_update | admin, write | POST | /api/usergroups.update | — |
usergroups_users_update | admin, delete, send, write | POST | /api/usergroups.users.update | — |
users_setPresence | write | POST | /api/users.setPresence | — |
views_open | send, write | POST | /api/views.open | — |
views_publish | send, write | POST | /api/views.publish | — |
views_push | send, write | POST | /api/views.push | — |
views_update | send, write | POST | /api/views.update | — |
apps_manifest_create | admin | GET | /api/apps.manifest.create | refused 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 | admin | GET | /api/apps.uninstall | refused 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 | admin | GET | /api/auth.revoke | refused 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 | admin | GET | /api/oauth.access | refused 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 | admin | GET | /api/oauth.token | refused 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 | admin | GET | /api/oauth.v2.access | refused 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 | admin | GET | /api/oauth.v2.exchange | refused 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 | admin | GET | /api/openid.connect.token | refused 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 | admin | GET | /api/tooling.tokens.rotate | refused 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_post | admin | POST | /api/apps.manifest.create | refused 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_post | admin | POST | /api/apps.uninstall | refused 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_post | admin | POST | /api/auth.revoke | refused 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_post | admin | POST | /api/oauth.access | refused 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_post | admin | POST | /api/oauth.token | refused 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_post | admin | POST | /api/oauth.v2.access | refused 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_post | admin | POST | /api/oauth.v2.exchange | refused 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_post | admin | POST | /api/openid.connect.token | refused 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_post | admin | POST | /api/tooling.tokens.rotate | refused 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 |