---
title: "Exchange an external authentication token"
method: POST
path: "/auth/external/token"
tags: ["External authentication"]
---

# Exchange an external authentication token

`POST /auth/external/token`

## Request

- Base URL: `https://api.hexclave.com/api/v1`
- URL: `https://api.hexclave.com/api/v1/auth/external/token`
- Auth: none declared

Verifies a configured external provider session and returns a short-lived Hexclave access token.

## Request body

- object
  - `provider_id` 'clerk-integration' | 'better-auth-integration' | 'workos-integration', required: The external authentication integration that issued the token.
  - `token` string, required: The provider's signed session token (a JWT). It must contain sub, sid and exp claims.

## Response `200`

Successful response

- object
  - `access_token` string, required
  - `session_id` string, required
  - `user_id` string, required
  - `is_new_user` boolean, required

## Changes

- **2026-10-06** `73b48cd952dc`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/hexclave/apis/hexclave-rest-api/changes/auth/external/token/post.md)

---

[API](https://skmtc.dev/hexclave/apis/hexclave-rest-api.md) - [All operations](https://skmtc.dev/hexclave/apis/hexclave-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hexclave/apis/hexclave-rest-api/revisions/296b3ce72474?raw)
