---
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

## Changes

- **2026-06-13** `33e4ba4936ad` — 2 info
  - added the optional property `agent_description` to the response with the `200` status
  - added the optional property `suggested_prompts` to the response with the `200` status
- **2026-05-01** `c9eb29ec9a1b` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/xorbitsai/apis/xagent/changes/api/widget/auth/post.md)

---

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