> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codegen.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate Slack Connect Token Endpoint

> Generate a temporary token for Slack account connection.

This token:
- Expires in 10 minutes
- Can only be used once
- Must be sent to the Codegen bot in a DM with format: "Connect my account: {token}"



## OpenAPI

````yaml api-reference/openapi3.json post /v1/slack-connect/generate-token
openapi: 3.1.0
info:
  title: Developer API
  description: API for application developers
  version: 1.0.0
servers:
  - url: https://api.codegen.com
    description: Codegen API
security: []
paths:
  /v1/slack-connect/generate-token:
    post:
      tags:
        - slack-connect
        - slack-connect
      summary: Generate Slack Connect Token Endpoint
      description: >-
        Generate a temporary token for Slack account connection.


        This token:

        - Expires in 10 minutes

        - Can only be used once

        - Must be sent to the Codegen bot in a DM with format: "Connect my
        account: {token}"
      operationId: >-
        generate_slack_connect_token_endpoint_v1_slack_connect_generate_token_post
      parameters:
        - name: authorization
          in: header
          required: false
          schema:
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateTokenRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateTokenResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    GenerateTokenRequest:
      properties:
        org_id:
          type: integer
          title: Org Id
      type: object
      required:
        - org_id
      title: GenerateTokenRequest
    GenerateTokenResponse:
      properties:
        token:
          type: string
          title: Token
        message:
          type: string
          title: Message
        expires_in_minutes:
          type: integer
          title: Expires In Minutes
      type: object
      required:
        - token
        - message
        - expires_in_minutes
      title: GenerateTokenResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````