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

# Issue bot token

> Issues a new token for the bot.

The token is valid for 24 hours and cannot be revoked. The token has the following scopes that allow chatting: `chats--access:rw`, `agents-bot--my:rw`, `customers:rw`. The required `bot_secret` is returned in the Create Bot Template and Create Bot methods. If you lost the secret, you can reset it using the Reset Bot Template Secret or Reset Bot Secret methods.



## OpenAPI

````yaml /api/configuration/v3.6/openapi.json post /action/issue_bot_token
openapi: 3.1.0
info:
  title: Configuration API
  version: v3.6
servers:
  - url: https://api.livechatinc.com/v3.6/configuration
security:
  - PersonalAccessToken: []
  - OAuth2BearerToken: []
paths:
  /action/issue_bot_token:
    post:
      tags:
        - Bots
      summary: Issue bot token
      description: >-
        Issues a new token for the bot.


        The token is valid for 24 hours and cannot be revoked. The token has the
        following scopes that allow chatting: `chats--access:rw`,
        `agents-bot--my:rw`, `customers:rw`. The required `bot_secret` is
        returned in the Create Bot Template and Create Bot methods. If you lost
        the secret, you can reset it using the Reset Bot Template Secret or
        Reset Bot Secret methods.
      operationId: issue-bot-token
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IssueBotTokenRequest'
            example:
              bot_id: 5c9871d5372c824cbf22d860a707a578
              client_id: 238ac5c3c3628210aca289c6d700d2c1
              bot_secret: 641e2ae6d997d2009a3ac92a05f37fc3
              organization_id: 1a8a9ec7-bd5d-4400-9204-3826740981e0
      responses:
        '200':
          description: A bot token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssueBotTokenResponse'
              example:
                token: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
components:
  schemas:
    IssueBotTokenRequest:
      type: object
      required:
        - bot_id
        - client_id
        - bot_secret
        - organization_id
      properties:
        bot_id:
          type: string
          description: The bot ID.
        client_id:
          type: string
          description: The client ID.
        bot_secret:
          type: string
          description: The bot secret.
        organization_id:
          type: string
          description: The organization ID.
    IssueBotTokenResponse:
      type: object
      properties:
        token:
          type: string
          description: A JWT bot token valid for 24 hours.
  securitySchemes:
    PersonalAccessToken:
      type: http
      scheme: basic
      description: >-
        Use your `account ID` as the username and your personal access token
        (PAT) as the password, or pass a Base64-encoded value directly in the
        Authorization header. For more information, see the <a
        href="/authentication/personal-access-tokens">personal access tokens
        guide</a>.
    OAuth2BearerToken:
      type: http
      scheme: bearer
      description: Authenticate using an OAuth 2.0 Bearer token.
      x-example: us-south1:MQraNrGCsoJvtxD7KNJQB1kM3d5

````