Slack Access API

The Access API from Slack — 4 operation(s) for access.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

slack-access-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  version: '1.0'
  title: Slack Admin Access API
  description: "The Slack Admin API is a set of privileged endpoints\x14primarily under admin.* with related SCIM and Audit Logs APIs\x14that lets Enterprise Grid owners and admins automate organization\x11 wide management and governance. It covers user lifecycle (provision, suspend, assign roles), workspace and channel administration across workspaces (create, move, archive channels; manage membership and settings), app governance (approve/deny or allowlist/ban apps and install them to workspaces), invite request handling, and security/compliance controls such as information barriers, session and authentication policies, and org\x11level analytics exports. These APIs require elevated admin scopes and are commonly used to power automated onboarding/offboarding, centralized channel and app controls, and integrations with identity, ITSM, and compliance systems."
tags:
- name: Access
paths:
  /canvases.access.delete:
    post:
      tags:
      - Access
      summary: Delete Canvas Access
      description: Removes access to a canvas for specified users or groups.
      operationId: postCanvasesAccessDelete
      parameters:
      - name: token
        in: header
        description: 'Authentication token. Requires scope: `canvases:write`'
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
              - canvas_id
              type: object
              properties:
                canvas_id:
                  type: string
                  description: ID of the canvas.
                user_ids:
                  type: array
                  description: User IDs to remove access for.
                  items:
                    type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
              example:
                ok: true
        default:
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  error:
                    type: string
              example:
                ok: false
                error: canvas_not_found
      security:
      - slackAuth:
        - canvases:write
  /canvases.access.set:
    post:
      tags:
      - Access
      summary: Set Canvas Access
      description: Sets access controls for a canvas, granting view or edit access to users or groups.
      operationId: postCanvasesAccessSet
      parameters:
      - name: token
        in: header
        description: 'Authentication token. Requires scope: `canvases:write`'
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
              - canvas_id
              - access_level
              type: object
              properties:
                canvas_id:
                  type: string
                  description: ID of the canvas.
                access_level:
                  type: string
                  description: Access level to grant (read, write).
                  enum:
                  - read
                  - write
                user_ids:
                  type: array
                  description: User IDs to grant access to.
                  items:
                    type: string
                channel_ids:
                  type: array
                  description: Channel IDs to grant access to.
                  items:
                    type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
              example:
                ok: true
        default:
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  error:
                    type: string
              example:
                ok: false
                error: canvas_not_found
      security:
      - slackAuth:
        - canvases:write
  /oauth.access:
    get:
      tags:
      - Access
      description: Exchanges a temporary OAuth verifier code for an access token.
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/oauth.access
      operationId: getOauthAccess
      parameters:
      - name: client_id
        in: query
        description: Issued when you created your application.
        schema:
          type: string
      - name: client_secret
        in: query
        description: Issued when you created your application.
        schema:
          type: string
      - name: code
        in: query
        description: The `code` param returned via the OAuth callback.
        schema:
          type: string
      - name: redirect_uri
        in: query
        description: This must match the originally submitted URI (if one was sent).
        schema:
          type: string
      - name: single_channel
        in: query
        description: Request the user to add your app only to a single channel. Only valid with a [legacy workspace app](https://api.slack.com/legacy-workspace-apps).
        schema:
          type: boolean
      responses:
        '200':
          description: Successful user token negotiation for a single scope
          content:
            application/json:
              schema:
                title: Default success template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_true'
                additionalProperties: true
                description: This method either only returns a brief _OK_ response or a verbose schema is not available for this method.
              example:
                access_token:
                - TOKEN
                enterprise_id: null
                scope: groups:write
                team_id: TXXXXXXXXX
                team_name: Wyld Stallyns LLC
        default:
          description: Typical error response
          content:
            application/json:
              schema:
                title: Default error template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_false'
                additionalProperties: true
                description: This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.
              example:
                error: invalid_client_id
                ok: false
      security:
      - slackAuth:
        - none
      summary: Slack Get Oauth Access
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /oauth.v2.access:
    get:
      tags:
      - Access
      description: Exchanges a temporary OAuth verifier code for an access token.
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/oauth.v2.access
      operationId: getOauthAccess
      parameters:
      - name: client_id
        in: query
        description: Issued when you created your application.
        schema:
          type: string
      - name: client_secret
        in: query
        description: Issued when you created your application.
        schema:
          type: string
      - name: code
        in: query
        description: The `code` param returned via the OAuth callback.
        required: true
        schema:
          type: string
      - name: redirect_uri
        in: query
        description: This must match the originally submitted URI (if one was sent).
        schema:
          type: string
      responses:
        '200':
          description: Successful token request with scopes for both a bot user and a user token
          content:
            application/json:
              schema:
                title: Default success template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_true'
                additionalProperties: true
                description: This method either only returns a brief _OK_ response or a verbose schema is not available for this method.
              example:
                access_token:
                - TOKEN
                app_id: A0KRD7HC3
                authed_user:
                  access_token:
                  - TOKEN
                  id: U1234
                  scope: chat:write
                  token_type: user
                bot_user_id: U0KRQLJ9H
                enterprise:
                  id: E12345678
                  name: slack-sports
                ok: true
                scope: commands,incoming-webhook
                team:
                  id: T9TK3CUKW
                  name: Slack Softball Team
                token_type: bot
        default:
          description: Typical error response
          content:
            application/json:
              schema:
                title: Default error template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_false'
                additionalProperties: true
                description: This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.
              example:
                error: invalid_client_id
                ok: false
      security:
      - slackAuth:
        - none
      summary: Slack Get Oauth Access
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK