CmdID

CmdID / aws / aws ivschat

aws ivschat create-chat-token

Creates an encrypted token that is used by a chat participant to establish an individual WebSocket chat connection to a room. AWS CLI reference

1 example 5 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To create a chat token

The following create-chat-token example creates an encrypted chat token that is used to establish an individual WebSocket connection to a room. The token is valid for one minute, and a connection (session) established with the token is valid for the specified duration.

aws ivschat create-chat-token --room-identifier "arn:aws:ivschat:us-west-2:12345689012:room/g1H2I3j4k5L6" --user-id "11231234" --capabilities "SEND_MESSAGE" --session-duration-in-minutes 30Identify
--room-identifierIdentifier of the room that the client is trying to access.
--user-idApplication-provided ID that uniquely identifies the user associated with this token.
--capabilitiesSet of capabilities that the user is allowed to perform in the room.
--session-duration-in-minutesSession duration (in minutes), after which the session expires.
Its output
{
    "token": "ACEGmnoq#1rstu2...BDFH3vxwy!4hlm!#5",
    "sessionExpirationTime": "2022-03-16T04:44:09+00:00",
    "tokenExpirationTime": "2022-03-16T03:45:09+00:00"
}

For more information, see Step 3: Authenticate and Authorize Chat Clients in the Amazon Interactive Video Service User Guide.

Options

5 in the AWS CLI reference
--attributesApplication-provided attributes to encode into the token and attach to a chat session.
--capabilitiesSet of capabilities that the user is allowed to perform in the room.
--room-identifierIdentifier of the room that the client is trying to access.
--session-duration-in-minutesSession duration (in minutes), after which the session expires.
--user-idApplication-provided ID that uniquely identifies the user associated with this token.