---
title: "Create WebRTC client token"
method: POST
path: "/v1/webrtc/client-tokens"
tags: ["WebRTC"]
---

# Create WebRTC client token

`POST /v1/webrtc/client-tokens`

## Request

- Base URL: `https://app.goguava.ai`
- URL: `https://app.goguava.ai/v1/webrtc/client-tokens`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/goguava/apis/guava-api-server/docs/v1/webrtc/client-tokens/post.ts> (a function with typed inputs; its response is checked against the schema)

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.

## Query parameters

- `webrtc_code` string, required: The WebRTC code the token grants access to.
- `expires_in` integer: Seconds until the token expires if it isn't used.

## Response `200`

Successful Response

- WebRTCClientTokenResponse
  - `token` string, required
  - `expires_at` string, date-time, required

## Other responses

- `401`: Missing or invalid credentials.
- `404`: WebRTC code not found.
- `422`: Validation Error

---

[API](https://skmtc.dev/goguava/apis/guava-api-server.md) - [All operations](https://skmtc.dev/goguava/apis/guava-api-server/llms.txt) - [OpenAPI document](https://skmtc.dev/goguava/apis/guava-api-server/revisions/2d944746bc25?raw)
