Event (Subscribe) - Amazon IVS

Event (Subscribe)

Events are messages generated by client actions or operations; e.g., join or leave notifications. Events may be generated by Amazon IVS Chat or your application. Use SendEvent (see the Amazon IVS Chat API Reference) to push event messages to the room.

Format

{ "Attributes": { "string": "string" }, "EventName": "string", "Id": "string", "RequestId" : "string", "SendTime": "string::date-time", "Type": "EVENT" }

Fields

Field Description

Attributes

For application-generated events, this contains details of the event; e.g., user_id, display_name, and/or anything you want.

For the system-generated event (aws:DELETE_MESSAGE), this contains two fields:

  • MessageId — The ID of the message that was deleted.

  • Reason — An explanation of why the message was deleted.

EventName

For application-generated events, this is preferably an enum used by client logic; e.g., user_joined.

There is one system-generated event. Its EventName is aws:DELETE_MESSAGE.

Id

An identifier generated by Amazon IVS Chat.

RequestId

An identifier optionally specified by your application (in the corresponding SendEvent) for tracking purposes.

SendTime

Timestamp of when the message was received by Amazon IVS Chat.

Type

EVENT