API ReferenceapiliveGET /v1/sessions/{id}/chat-token

GET /v1/sessions/\{id\}/chat-token

Service: live · operationId: (none)

Mint a Stream Chat token scoped to the session’s chat channel. The client uses the returned api_key + token to connect to GetStream and watch the channel — the secret never leaves the service.

Required scopes

(no scope declared — review service config)

Path parameters

  • id (string) required

Responses

200 Stream Chat connection bundle

{
  "type": "object",
  "properties": {
    "api_key": {
      "type": "string"
    },
    "token": {
      "type": "string"
    },
    "user_id": {
      "type": "string"
    },
    "channel_id": {
      "type": "string"
    },
    "channel_type": {
      "type": "string"
    },
    "expires_in": {
      "type": "integer",
      "exclusiveMinimum": 0
    }
  },
  "required": [
    "api_key",
    "token",
    "user_id",
    "channel_id",
    "channel_type",
    "expires_in"
  ]
}

404 Session not found

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

503 Stream Chat not configured

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

Example

curl -X GET https://live.platform.loop.health/v1/sessions/{id}/chat-token \
  -H "Authorization: Bearer $ACCESS_TOKEN"