API ReferenceapilivePOST /v1/live/calls/{id}/token

POST /v1/live/calls/\{id\}/token

Service: live · operationId: (none)

Mint a Stream user token scoped to this call

Required scopes

(no scope declared — review service config)

Path parameters

  • id (string) required

Request body

{
  "type": "object",
  "properties": {
    "user_id": {
      "type": "string",
      "minLength": 1
    },
    "ttl_seconds": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 86400
    }
  },
  "required": [
    "user_id"
  ]
}

Responses

200 Token issued

{
  "type": "object",
  "properties": {
    "token": {
      "type": "string"
    },
    "stream_call_id": {
      "type": "string"
    },
    "stream_call_type": {
      "type": "string"
    },
    "expires_in_seconds": {
      "type": "integer",
      "exclusiveMinimum": 0
    }
  },
  "required": [
    "token",
    "stream_call_id",
    "stream_call_type",
    "expires_in_seconds"
  ]
}

503 Streaming provider not configured

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

Example

curl -X POST https://live.platform.loop.health/v1/live/calls/{id}/token \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'