API ReferenceapicommsGET /v1/stream/chat-token

GET /v1/stream/chat-token

Service: comms · operationId: (none)

Mint a user-scoped Stream Chat token for the authenticated user.

Required scopes

(no scope declared — review service config)

Query parameters

  • channel_id (string) —

Responses

200 Stream Chat token

{
  "type": "object",
  "properties": {
    "token": {
      "type": "string"
    },
    "user_id": {
      "type": "string"
    },
    "expires_in": {
      "type": "number"
    }
  },
  "required": [
    "token",
    "user_id",
    "expires_in"
  ]
}

403 Requested channel is not accessible to the authenticated user

{
  "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://comms.platform.loop.health/v1/stream/chat-token \
  -H "Authorization: Bearer $ACCESS_TOKEN"