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

- WidgetAuthResponse
  - `access_token` string, required
  - `token_type` string
  - `agent_id` integer, nullable
  - `agent_name` string, nullable
  - `agent_logo` string, nullable

## Other responses

- `422` — Validation Error

## Changes

- **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/c9eb29ec9a1b/schema)
