---
title: "Authenticate Widget"
method: POST
path: "/api/widget/auth"
tags: ["widget"]
---

# Authenticate Widget

`POST /api/widget/auth`

Authenticate widget and issue a guest token

## Request body

- WidgetAuthRequest
  - `guest_id` string, required
  - `agent_id` integer, nullable

## Response `200`

Successful Response

- PublicChatAuthResponse
  - `access_token` string, required
  - `token_type` string
  - `agent_id` integer, nullable
  - `agent_name` string, nullable
  - `agent_logo` string, nullable
  - `agent_description` string, nullable
  - `suggested_prompts` string[]

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/xorbitsai/apis/xagent.md) · [All operations](https://skmtc.net/xorbitsai/apis/xagent/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/xorbitsai/xagent/revisions/33e4ba4936ad/schema)
