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

# Get a channel token

> Exchanges your **channel credential** for a channel token. Only credentials whose `apiKey` starts with `kmsk-channel-` are accepted; your regular partner credentials are not. Kravata issues one channel credential per company when it enables the channel.

#### Production

Available in test today. In production these calls go to `https://partners-api.kravata.co` with your mTLS client certificate; ask your Kravata point of contact before going live.

See the [WhatsApp channel guide](/stack/whatsapp-channel) for the full flow.

#### Errors

| Status | Code | Meaning |
| --- | --- | --- |
| 401 | `INVALID_CREDENTIALS` | Wrong key or secret, or not a channel credential. |



## OpenAPI

````yaml /stack/openapi.json post /api/v1/channel/token
openapi: 3.1.0
info:
  title: Kravata Stack API
  version: '2.0'
  description: >-
    Kravata Stack API: users, accounts, custody wallets, liquidity ramps and
    fiat payments.
servers:
  - url: https://test-api-kore.kravata.co
    description: Test
  - url: https://partners-api.kravata.co
    description: Production (mTLS + IP allowlist)
security:
  - bearerAuth: []
tags:
  - name: Authentication
  - name: Users
  - name: Accounts
  - name: Earn
  - name: Custody
  - name: Liquidity Ramps
  - name: Payments
  - name: Webhooks
  - name: Request Logs
  - name: WhatsApp Channel
    description: >-
      Endpoints for a company's own WhatsApp bot acting for one end user at a
      time. See the WhatsApp channel guide.
paths:
  /api/v1/channel/token:
    post:
      tags:
        - WhatsApp Channel
      summary: Get a channel token
      description: >-
        Exchanges your **channel credential** for a channel token. Only
        credentials whose `apiKey` starts with `kmsk-channel-` are accepted;
        your regular partner credentials are not. Kravata issues one channel
        credential per company when it enables the channel.


        #### Production


        Available in test today. In production these calls go to
        `https://partners-api.kravata.co` with your mTLS client certificate; ask
        your Kravata point of contact before going live.


        See the [WhatsApp channel guide](/stack/whatsapp-channel) for the full
        flow.


        #### Errors


        | Status | Code | Meaning |

        | --- | --- | --- |

        | 401 | `INVALID_CREDENTIALS` | Wrong key or secret, or not a channel
        credential. |
      operationId: channel-token
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - apiKey
                - secretKey
              properties:
                apiKey:
                  type: string
                  description: Channel API key (`kmsk-channel-...`).
                secretKey:
                  type: string
                  description: Channel secret key.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                required:
                  - accessToken
                  - expiresIn
                properties:
                  accessToken:
                    type: string
                    description: Channel token.
                  expiresIn:
                    type: integer
                    description: Validity in seconds.
                    example: 3600
                  tokenType:
                    type: string
                    description: Always `Bearer`.
                    example: Bearer
      security: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Access token from POST /api/v1/client/token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.