ivsrealtime / Client / create_participant_token
create_participant_token#
- ivsrealtime.Client.create_participant_token(**kwargs)#
Creates an additional token for a specified stage. This can be done after stage creation or when tokens expire. Tokens always are scoped to the stage for which they are created.
Encryption keys are owned by Amazon IVS and never used directly by your application.
See also: AWS API Documentation
Request Syntax
response = client.create_participant_token( attributes={ 'string': 'string' }, capabilities=[ 'PUBLISH'|'SUBSCRIBE', ], duration=123, stageArn='string', userId='string' )
- Parameters:
attributes (dict) –
Application-provided attributes to encode into the token and attach to a stage. Map keys and values can contain UTF-8 encoded text. The maximum length of this field is 1 KB total. This field is exposed to all stage participants and should not be used for personally identifying, confidential, or sensitive information.
(string) –
(string) –
capabilities (list) –
Set of capabilities that the user is allowed to perform in the stage. Default:
PUBLISH, SUBSCRIBE
.(string) –
duration (integer) – Duration (in minutes), after which the token expires. Default: 60 (1 hour).
stageArn (string) –
[REQUIRED]
ARN of the stage to which this token is scoped.
userId (string) – Name that can be specified to help identify the token. This can be any UTF-8 encoded text. This field is exposed to all stage participants and should not be used for personally identifying, confidential, or sensitive information.
- Return type:
dict
- Returns:
Response Syntax
{ 'participantToken': { 'attributes': { 'string': 'string' }, 'capabilities': [ 'PUBLISH'|'SUBSCRIBE', ], 'duration': 123, 'expirationTime': datetime(2015, 1, 1), 'participantId': 'string', 'token': 'string', 'userId': 'string' } }
Response Structure
(dict) –
participantToken (dict) –
The participant token that was created.
attributes (dict) –
Application-provided attributes to encode into the token and attach to a stage. This field is exposed to all stage participants and should not be used for personally identifying, confidential, or sensitive information.
(string) –
(string) –
capabilities (list) –
Set of capabilities that the user is allowed to perform in the stage.
(string) –
duration (integer) –
Duration (in minutes), after which the participant token expires. Default: 60 (1 hour).
expirationTime (datetime) –
ISO 8601 timestamp (returned as a string) for when this token expires.
participantId (string) –
Unique identifier for this participant token, assigned by IVS.
token (string) –
The issued client token, encrypted.
userId (string) –
Name to help identify the token. This can be any UTF-8 encoded text. This field is exposed to all stage participants and should not be used for personally identifying, confidential, or sensitive information.
Exceptions
ivsrealtime.Client.exceptions.ResourceNotFoundException
ivsrealtime.Client.exceptions.ValidationException
ivsrealtime.Client.exceptions.AccessDeniedException
ivsrealtime.Client.exceptions.ServiceQuotaExceededException
ivsrealtime.Client.exceptions.PendingVerification