openapi: 3.2.0
info:
title: API.stream Live Authentication Service API
description: The Live API enables developers to build video-enabled applications.
version: '2.1'
servers:
- url: https://live.api.stream/live/v2
security:
- AccessToken: []
tags:
- name: Authentication Service
description: The Authentication Service provides token services for clients
paths:
/authentication/token:
put:
summary: Refresh Access Token
description: Forcibly refresh an access token prior to expiration
operationId: AuthenticationService_RefreshAccessToken
responses:
'200':
description: A successful response.
content:
application/json:
schema:
$ref: '#/components/schemas/v21RefreshAccessTokenResponse'
'401':
description: The access token provided is not valid
content:
application/json:
schema: {}
'403':
description: The access token provided does not have access to specified resource
content:
application/json:
schema: {}
'404':
description: The specified resource was not found
content:
application/json:
schema: {}
'429':
description: The specified service is busy; please use an exponential backoff on subsequent requests.
content:
application/json:
schema: {}
'500':
description: The specified service is unavailable; please try again later
content:
application/json:
schema: {}
default:
description: An unexpected error response.
content:
application/json:
schema:
$ref: '#/components/schemas/rpcStatus'
tags:
- Authentication Service
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/v21RefreshAccessTokenRequest'
required: true
/authentication/token/guest:
post:
summary: Create Guest Access Token
description: Create an access token for a guest
operationId: AuthenticationService_CreateGuestAccessToken
responses:
'200':
description: A successful response.
content:
application/json:
schema:
$ref: '#/components/schemas/v21CreateGuestAccessTokenResponse'
'401':
description: The access token provided is not valid
content:
application/json:
schema: {}
'403':
description: The access token provided does not have access to specified resource
content:
application/json:
schema: {}
'404':
description: The specified resource was not found
content:
application/json:
schema: {}
'429':
description: The specified service is busy; please use an exponential backoff on subsequent requests.
content:
application/json:
schema: {}
'500':
description: The specified service is unavailable; please try again later
content:
application/json:
schema: {}
default:
description: An unexpected error response.
content:
application/json:
schema:
$ref: '#/components/schemas/rpcStatus'
tags:
- Authentication Service
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/v21CreateGuestAccessTokenRequest'
required: true
components:
schemas:
rpcStatus:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
details:
type: array
items:
$ref: '#/components/schemas/protobufAny'
v21RefreshAccessTokenResponse:
type: object
v21GuestAccessTokenDirect:
type: object
properties:
displayName:
type: string
example: Eddy Current
title: display name of the guest (used to generate webrtc particpant name)
required:
- display_name
serviceUserId:
type: string
example: 7132b004-61e8-49c1-8dc8-4bb3269ce6f
title: service-specific user id (used for record auditing purposes)
title: create an immutable, single-use guest access token
required:
- displayName
v21GuestAccessToken:
type: object
properties:
direct:
$ref: '#/components/schemas/v21GuestAccessTokenDirect'
exchange:
$ref: '#/components/schemas/v21GuestAccessTokenExchange'
title: the type of access token (selec one)
v21CreateGuestAccessTokenResponse:
type: object
properties:
accessToken:
type: string
example: 7132b004-61e8-49c1-8dc8-4bb3269ce6f
title: access token for guest to be used in subsequent API calls
url:
type: string
title: the shortened url
v21Role:
type: string
enum:
- ROLE_HOST
- ROLE_COHOST
- ROLE_CONTRIBUTOR
- ROLE_GUEST
- ROLE_VIEWER
- ROLE_RENDERER
- ROLE_PLATFORM
- ROLE_IMPERSONATE
title: defined roles
v21CreateGuestAccessTokenRequest:
type: object
properties:
collectionId:
type: string
example: 7132b004-61e8-49c1-8dc8-4bb3269ce6f
title: id of the collection this token is allowed to access
required:
- collection_id
projectId:
type: string
example: 7132b004-61e8-49c1-8dc8-4bb3269ce6f
title: id of the project this token is allowed to access
required:
- project_id
maxDuration:
type: integer
format: int64
example: 172800000
default: '172800000'
title: requested duration (ms) of token before it expires
role:
$ref: '#/components/schemas/v21Role'
example: ROLE_GUEST
title: the requested role of the guest
token:
$ref: '#/components/schemas/v21GuestAccessToken'
title: the type of token
url:
type: string
example: https://rainmaker.gg/overlay/e67cfd6ad57560962fddcf63611d2834/1
title: request a shortened url
required:
- collectionId
- projectId
v21GuestAccessTokenExchange:
type: object
properties:
maxDuration:
type: integer
format: int64
example: 300000
default: '300000'
title: the max duration this token is valid for redemption
title: create a multi-use guest access token
v21RefreshAccessTokenRequest:
type: object
protobufAny:
type: object
properties:
'@type':
type: string
additionalProperties: {}
securitySchemes:
AccessToken:
type: apiKey
description: 'Assert your access token into a HTTP Header named ''Authorization: Bearer''
curl -H ''Authorization: Bearer bar'' https://live.api.stream/live/v2/collection/foo' name: 'Authorization: Bearer' in: header ApiKey: type: apiKey description: Assert your api key into a HTTP Header named 'X-API-Key'
curl -H 'X-API-Key:bar' https://live.api.stream/live/v2/collection/fooname: X-API-Key in: header x-tagGroups: - name: Services tags: - CollectionService - ProjectService - SourceService - DestinationService - AuthenticationService - BackendAuthenticationService - PublicAuthenticationService