Skip to content
Proud to collaborate with Microsoft for Startups

neon.auth.anonymous_token ​

Mint a Managed Better Auth anonymous JWT for Neon Data API calls

Mint a short-lived anonymous JWT for Neon Data API (Managed Better Auth).

Resolves the Auth base URL via GET …/auth when auth_base_url is omitted, then calls GET {auth_base_url}/token/anonymous (no Neon API key on that call).

Inputs:

  • auth_base_url: optional absolute Neon Auth URL (…/auth).
  • OR connection_uuid + neon_project_id + neon_branch_id to resolve it.

Outputs (terminal state_data):

  • jwt: str (sensitive) — anonymous Bearer JWT for Data API
  • auth_base_url: str — Auth URL used
  • expires_at: int|null — unix expiry when provided by Neon Auth

Compensation: none (token is short-lived; discard after use). Do not log or persist jwt beyond the immediate composition step.

Plugin required when resolving Auth URL: context.get_plugin("neon").

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-neon
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
connection_uuiduuidNo—Cloud connection (required when auth_base_url omitted)
neon_project_idstringNo—Neon project ID (with connection_uuid when resolving)
neon_branch_idstringNo—Neon branch ID (with connection_uuid when resolving)
auth_base_urlstringNo—Managed Better Auth base URL from neon.auth.get
timeout_secondsintegerNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
connection_uuiduuidNo——
neon_project_idstringNo——
neon_branch_idstringNo——
auth_base_urlstringNo——
timeout_secondsintegerNo——
jwtstringNo—Anonymous Data API JWT (scrub after use)
expires_atintegerNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—execute—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "neon.auth.anonymous_token",
  "initial_data": {
    "connection_uuid": "value",
    "neon_project_id": "value",
    "neon_branch_id": "value",
    "auth_base_url": "value"
  }
}