tellcasey
APIAPI Reference

Tokens

/ephemeral-tokens

POST
/ephemeral-tokens

Create an ephemeral authentication token for a user. Requires API key with tokens:create scope. Used by external systems to generate short-lived JWT tokens for widget authentication.

Authorization

apiKeyAuth
AuthorizationBearer <token>

Backend API key for server-to-server calls. Format: sk_live_... or sk_test_...

In: header

Request Body

application/json

Token creation parameters

connection_code*string
Length1 <= length
user_id?string
profile?

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:3002/v1/backend/ephemeral-tokens" \  -H "Content-Type: application/json" \  -d '{    "connection_code": "string"  }'
{
  "data": {
    "user_id": "string",
    "token": "string",
    "expires_at": "string"
  },
  "error": {
    "message": "string",
    "code": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  },
  "meta": {
    "request_id": "string",
    "timestamp": "string"
  }
}
{
  "data": null,
  "error": {
    "message": "string",
    "code": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  },
  "meta": {
    "request_id": "string",
    "timestamp": "string"
  }
}
{
  "data": null,
  "error": {
    "message": "string",
    "code": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  },
  "meta": {
    "request_id": "string",
    "timestamp": "string"
  }
}
{
  "data": null,
  "error": {
    "message": "string",
    "code": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  },
  "meta": {
    "request_id": "string",
    "timestamp": "string"
  }
}
{
  "data": null,
  "error": {
    "message": "string",
    "code": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  },
  "meta": {
    "request_id": "string",
    "timestamp": "string"
  }
}