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

# Create WebRTC client token

> Creates a short-lived token that lets a client connect to a WebRTC code.

Tokens are single-use: a token is consumed when a call is created with it. Create a new
token for each call.



## OpenAPI

````yaml https://app.goguava.ai/openapi.json post /v1/webrtc/client-tokens
openapi: 3.1.0
info:
  title: Guava API Server
  version: guava-release-0.51.0
servers:
  - url: https://app.goguava.ai
security: []
paths:
  /v1/webrtc/client-tokens:
    post:
      tags:
        - WebRTC
      summary: Create WebRTC client token
      description: >-
        Creates a short-lived token that lets a client connect to a WebRTC code.


        Tokens are single-use: a token is consumed when a call is created with
        it. Create a new

        token for each call.
      operationId: create_webrtc_client_token_v1_webrtc_client_tokens_post
      parameters:
        - name: webrtc_code
          in: query
          required: true
          schema:
            type: string
            description: The WebRTC code the token grants access to.
            title: Webrtc Code
          description: The WebRTC code the token grants access to.
        - name: expires_in
          in: query
          required: false
          schema:
            type: integer
            maximum: 86400
            minimum: 1
            description: Seconds until the token expires if it isn't used.
            default: 3600
            title: Expires In
          description: Seconds until the token expires if it isn't used.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebRTCClientTokenResponse'
        '401':
          description: Missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: WebRTC code not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKey: []
components:
  schemas:
    WebRTCClientTokenResponse:
      properties:
        token:
          type: string
          title: Token
        expires_at:
          type: string
          format: date-time
          title: Expires At
      type: object
      required:
        - token
        - expires_at
      title: WebRTCClientTokenResponse
    ErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
      type: object
      required:
        - detail
      title: ErrorResponse
    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
  securitySchemes:
    APIKey:
      type: http
      description: 'A Guava API key, sent as `Authorization: Bearer <key>`.'
      scheme: bearer

````

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