Module Values.CreateChatTokenResponseSource

Creates an encrypted token that is used by a chat participant to establish an individual WebSocket chat connection to a room. When the token is used to connect to chat, the connection is valid for the session duration specified in the request. The token becomes invalid at the token-expiration timestamp included in the response. Use the capabilities field to permit an end user to send messages or moderate a room. The attributes field securely attaches structured data to the chat session; the data is included within each message sent by the end user and received by other participants in the room. Common use cases for attributes include passing end-user profile data like an icon, display name, colors, badges, and other display features. Encryption keys are owned by Amazon IVS Chat and never used directly by your application.

Sourcetype nonrec t = {
  1. token : ChatToken.t option;
    (*

    The issued client token, encrypted.

    *)
  2. tokenExpirationTime : Time.t option;
    (*

    Time after which the token is no longer valid and cannot be used to connect to a room. This is an ISO 8601 timestamp; note that this is returned as a string.

    *)
  3. sessionExpirationTime : Time.t option;
    (*

    Time after which an end user's session is no longer valid. This is an ISO 8601 timestamp; note that this is returned as a string.

    *)
}
Sourcetype nonrec error = [
  1. | `AccessDeniedException of AccessDeniedException.t
  2. | `PendingVerification of PendingVerification.t
  3. | `ResourceNotFoundException of ResourceNotFoundException.t
  4. | `ValidationException of ValidationException.t
  5. | `Unknown_operation_error of string * string option
]
Sourceval make : ?token:??? -> ?tokenExpirationTime:??? -> ?sessionExpirationTime:??? -> unit -> t
Sourceval error_of_json : string -> Yojson.Safe.t -> [> `AccessDeniedException of AccessDeniedException.t | `PendingVerification of PendingVerification.t | `ResourceNotFoundException of ResourceNotFoundException.t | `Unknown_operation_error of string * string option | `ValidationException of ValidationException.t ]
Sourceval error_of_xml : string -> Awso.Xml.t -> [> `AccessDeniedException of AccessDeniedException.t | `PendingVerification of PendingVerification.t | `ResourceNotFoundException of ResourceNotFoundException.t | `Unknown_operation_error of string * string option | `ValidationException of ValidationException.t ]
Sourceval error_to_json : error -> Yojson.Safe.t
Sourceval to_value : t -> [> `Structure of (string * [> `String of ChatToken.t | `Timestamp of Time.t ]) list ]
Sourceval to_query : t -> Awso.Client.Query.t
Sourceval of_xml : Awso.Xml.t -> t
Sourceval of_string : string -> t
Sourceval of_json : Yojson.Safe.t -> t
Sourceval to_json : t -> Yojson.Safe.t