100ms Logo

100ms

Docs

Search docs
/

Webhook

Introduction

Webhook is an HTTP(S) endpoint used for pushing the notifications to your application. Event-based webhooks/user-defined HTTP webhooks, can be used to track the events in your room and build business logic, allowing you to create analytics on your traffic. Create an attendance system, for instance. Every session, 100ms sends a list of events to the URL you specify in the webhook configuration. For analytics and/or debugging, you can store these data on your server.

To handle a webhook, you must create a listener to accept these HTTP requests from 100ms.

Requirements

  • Webhook MUST implement POST HTTP method for receiving notifications. 100ms notifications are in JSON format so it should be handled accordingly.
  • To handle webhooks in your app, your endpoint should:
    • Capture HTTP requests
    • Respond to the requests
  • When 100ms sends the HTTP request callbacks to the webhook during an event, you should capture the request and respond with a 200 OK response. You can store the webhook data in your database for later processing.

    Note: 100ms automatically retries webhooks three times if your server does not return an HTTP 200 status code.

    • First at 1 second after the original attempt.
    • Second at 3 seconds after the first retry attempt.
    • Third at 10 seconds after the second retry attempt.

How to secure webhooks

You can secure webhooks in two ways:

  1. Whitelisting 100ms NAT gateway IP addresses,
  2. Specifying unique headers while configuring webhook endpoint in 100ms.

IP whitelisting

Your infrastructure might be secured by a firewall that monitors and filters incoming requests. To ensure that your firewall does not block the event-based webhooks sent by 100ms, allow traffic from these 100ms NAT gateway IP addresses to your webhook endpoint.

34.100.213.146/32 35.200.143.211/32 34.100.191.162/32 34.100.132.35/32 34.93.93.114/32 34.131.109.150/32 34.131.52.47/32 34.131.200.41/32 34.131.13.182/32 34.131.24.136/32 34.138.143.222/32 35.242.196.203/32 35.200.222.156/32 34.93.74.33/32 34.93.142.55/32 34.93.176.177/32 34.93.210.177/32 34.93.175.47/32

Specifying headers

Additionally, you can specify headers that will be passed transparently to your webhook endpoint. This can be used for securing or tracing the origin of the request.

How to configure Webhook

Webhook can be configured using Developer section of 100ms Dashboard

Events

Event is a JSON dictionary which has the following keys.

Event Attributes

NameTypeDescription
versionstringVersion of the event

Example: 2.0
idstringId of the event

Example: bd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
app_idstringApp ID from which this event is generated

Example: 5ff5881b80b66969e1fb35f6
account_idstringCustomer ID from which this event is generated

Example: 5ff5881b80b66969e1fb35f4
template_idstringTemplate ID of the room

Example: 66112497abcd52312556c4gg
timestamptimestamp (in UTC)Timestamp of the event

Example: 2020-11-11T16:32:17Z
typestringType of the event

Example: peer.join.success
datadictEvent data. Its keys will be different for different type of event.

Example: < See description below >

Sample Event Payload

{ "version": "2.0", "id": "6c75de35-b778-4fb0-88ae-114c28dc285f", "account_id": "60b8e13a6eb86d8101b57354", "timestamp": "2021-08-08T07:04:15Z", "type": "peer.join.success", "data": { "joined_at": "2021-08-08T07:04:15.001380432Z", "peer_id": "83b869e1-9a4b-4037-84b2-913cf76e4392", "role": "host", "room_id": "60b8e13a6eb86d8101b57354", "room_name": "test room", "session_id": "610f81ee870dde099a249948", "template_id": "66112497abcd52312556c4gg", "user_id": "user.001", "user_name": "test user" } }

List of events

Here's the list of events available on the 100ms platform.

Event nameDescription
sessionTriggered during the start and end of a session.

Events: session.open.success, session.close.success
peerTriggered when a peer join/leave succeeds/fails.

Events: peer.join.success, peer.leave.success, peer.join.failure, peer.leave.failure
roomTriggered when a room ends.

Events: room.end.success
SFU recordingTriggered during the start, end, and failure of a SFU recording.

Events: recording.success, recording.failed
RTMP Streaming & Browser RecordingTriggered during the start, end, and failure of RTMP streaming and/or browser recording.

Events: beam.started.success, beam.stopped.success, beam.recording.success, beam.failure
HLS Streaming EventsTriggered during the start, end, and failure of HLS streaming and/or HLS recording.

Events: hls.started.success, hls.stopped.success, hls.recording.success, hls.failure
Role change EventsTriggered when a role is updated.

Events: role.change.success

Session Events

session.open.success

This event will be sent when session opens successfully.

Attributes

NameTypeDescription
room_idstring100ms assigned room id

Example: 5f9edc6ac238215aec2312df
room_namestringRoom name provided when creating the room

Example: Test Room
session_idstring100ms assigned id to identify the session

Example: 5f9edc6bd238215aec7700df
template_idstringTemplate ID of the room

Example: 66112497abcd52312556c4gg
session_started_attimestamp (in UTC)Timestamp when session started

Example: 2020-11-11T16:32:17Z

Sample session.open.success event

{ "version": "2.0", "id": "********-****-****-****-***********", "account_id": "************************", "app_id": "************************", "timestamp": "2021-11-30T12:58:49Z", "type": "session.open.success", "data": { "room_id": "************************", "room_name": "**********", "session_id": "************************", "template_id": "************************", "session_started_at": "2021-11-30T12:58:49.97291247Z" } }

session.close.success

This event will be sent when session closes successfully.

Attributes

NameTypeDescription
room_idstring100ms assigned room id

Example: 5f9edc6ac238215aec2312df
room_namestringRoom name provided when creating the room

Example: Test Room
session_idstring100ms assigned id to identify the session

Example: 5f9edc6bd238215aec7700df
template_idstringTemplate ID of the room

Example: 66112497abcd52312556c4gg
session_durationintDuration the user spent in the room in seconds

Example: 36000
session_started_attimestamp (in UTC)Timestamp when session started

Example: 2020-11-11T16:32:17Z
session_stopped_attimestamp (in UTC)Timestamp when session ended

Example: 2020-11-11T16:32:17Z

Sample session.close.success event

{ "version": "2.0", "id": "********-****-****-****-***********", "account_id": "************************", "app_id": "************************", "timestamp": "2021-11-30T12:58:49Z", "type": "session.close.success", "data": { "room_id": "************************", "room_name": "**********", "session_id": "************************", "template_id": "************************", "session_duration": 600, "session_started_at": "2021-11-30T12:48:49.97291247Z", "session_stopped_at": "2021-11-30T12:58:49.97291247Z" } }

Peer Events

peer.join.success

This event will be sent when any peer joins the room successfully

Attributes

NameTypeDescription
room_idstring100ms assigned room id

Example: 5f9edc6ac238215aec2312df
room_namestringRoom name provided when creating the room

Example: Test Room
session_idstring100ms assigned id to identify the session

Example: 5f9edc6bd238215aec7700df
peer_idstring100ms assigned id to identify the joining user

Example: bd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
user_idstringUser id assigned by the customer

Example: user.001
template_idstringTemplate ID of the room

Example: 66112497abcd52312556c4gg
user_namestringUser name of the joining user

Example: Test user
user_datastringUser data of the joining user

Example: {"isHandRaised":true}
rolestringRole of the joining user

Example: host
joined_attimestamp (in UTC)Timestamp when user joined

Example: 2020-11-11T16:32:17Z
session_started_attimestamp (in UTC)Timestamp when session started

Example: 2020-11-11T16:32:17Z

Sample peer.join.success event

{ "version": "2.0", "id": "********-****-****-****-***********", "account_id": "************************", "timestamp": "2021-11-30T12:58:49Z", "type": "peer.join.success", "data": { "joined_at": "2021-11-30T12:58:49.97291247Z", "peer_id": "********-****-****-****-***********", "role": "********", "room_id": "************************", "room_name": "**********", "session_id": "************************", "template_id": "************************", "user_id": "************************", "user_name": "********", "user_data": "", "session_started_at": "2021-11-30T12:58:49.97291247Z" } }

peer.leave.success

This event will be sent when peer leaves the room

Attributes

NameTypeDescription
room_idstring100ms assigned room id

Example: 5f9edc6ac238215aec2312df
room_namestringRoom name provided when creating the room

Example: Test Room
session_idstring100ms assigned id to identify the session

Example: 5f9edc6bd238215aec7700df
peer_idstring100ms assigned id to identify the joining user

Example: bd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
user_idstringUser id assigned by the customer

Example: user.001
template_idstringTemplate ID of the room

Example: 66112497abcd52312556c4gg
user_namestringUser name of the user

Example: Test user
user_datastringUser data of the user

Example: {"isHandRaised":true}
rolestringRole of the user

Example: host
left_attimestamp (in UTC)Timestamp when user left

Example: 2020-11-11T17:32:17Z
durationintDuration the user spent in the room in seconds

Example: 36000
reasonstringReason for the peer leaving, see more details below

Example: client request
joined_attimestamp (in UTC)Timestamp when user joined

Example: 2020-11-11T16:32:17Z
session_started_attimestamp (in UTC)Timestamp when session started

Example: 2020-11-11T16:32:17Z

Peer Leave Reason

  1. client request
  2. peer kicked
  3. websocket closed
  4. ice connection state closed

Note:

  1. In case of peer is kicked / room is ended
    • Client itself initiates a peer leave on receiving the signal. In these cases, reason will be client request
    • Also, server starts a timer for the same. If peer leave is not received from client before the timer ends, the server then kicks the peer itself. In such cases, reason will be peer kicked
  2. All other reasons except client request and peer kicked denote that the peer has left unexpectedly.

Sample peer.leave.success event

{ "version": "2.0", "id": "********-****-****-****-***********", "account_id": "************************", "timestamp": "2021-11-30T12:58:58Z", "type": "peer.leave.success", "data": { "duration": 40, "joined_at": "2021-11-30T12:58:49.97291247Z", "left_at": "2021-11-30T12:58:58.500451704Z", "peer_id": "********-****-****-****-***********", "reason": "client request", "role": "********", "room_id": "************************", "room_name": "**********", "session_id": "************************", "template_id": "************************", "user_id": "************************", "user_name": "********", "user_data": "", "session_started_at": "2021-11-30T12:58:49.97291247Z" } }

peer.join.failure

This event will be sent when a peer fails to join a room. This can occur when,

  1. Server is overloaded and results in timeout
  2. Network disconnection

Attributes

NameTypeDescription
room_idstring100ms assigned room id

Example: 5f9edc6ac238215aec2312df
room_namestringRoom name provided when creating the room

Example: Test Room
peer_idstring100ms assigned id to identify the joining user

Example: bd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
user_idstringUser id assigned by the customer

Example: user.001
template_idstringTemplate ID of the room

Example: 66112497abcd52312556c4gg
user_namestringUser name of the user

Example: Test user
user_datastringUser data of the user

Example: {"isHandRaised":true}
rolestringRole of the user

Example: host
joined_attimestamp (in UTC)Timestamp when user joined

Example: 2020-11-11T16:32:17Z
error_messagestringReason for failure

Example: Peer not joined

Peer join failure Reason

  1. role not allowed
  2. network disconnection
  3. duplicate peer id

Sample peer.join.failure event

{ "version": "2.0", "id": "********-****-****-****-***********", "account_id": "************************", "timestamp": "2021-11-25T09:10:35Z", "type": "peer.join.failure", "data": { "joined_at": "0001-01-01T00:00:00Z", "peer_id": "********-****-****-****-***********", "role": "********", "room_id": "************************", "room_name": "**********", "user_id": "************************", "template_id": "************************", "user_name": "********", "user_data": "", "error_message": "role not allowed" } }

peer.leave.failure

This event will be sent when the peer leave fails. This can occur when,

  1. peer.leave is called twice
  2. peer.leave is called before peer.join or if peer.join has failed
  3. peer.leave is called after peer is kicked out of room / room has ended

Attributes

NameTypeDescription
room_idstring100ms assigned room id

Example: 5f9edc6ac238215aec2312df
room_namestringRoom name provided when creating the room

Example: Test Room
peer_idstring100ms assigned id to identify the joining user

Example: bd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
user_idstringUser id assigned by the customer

Example: user.001
template_idstringTemplate ID of the room

Example: 66112497abcd52312556c4gg
user_namestringUser name of the user

Example: Test user
user_datastringUser data of the user

Example: {"isHandRaised":true}
rolestringRole of the user

Example: host
left_attimestamp (in UTC)Timestamp when user left

Example: 2020-11-11T17:32:17Z
durationintDuration the user spent in the room in seconds

Example: 36000
error_messagestringReason for failure

Example: Peer not joined
joined_attimestamp (in UTC)Timestamp when user joined

Example: 2020-11-11T16:32:17Z

Peer leave failure Reason

  1. peer not joined

Sample peer.leave.failure event

{ "version": "2.0", "id": "********-****-****-****-***********", "account_id": "************************", "timestamp": "2021-11-30T12:55:51Z", "type": "peer.leave.failure", "data": { "duration": 0, "left_at": "0001-01-01T00:00:00Z", "joined_at": "2021-11-30T12:58:49.97291247Z", "peer_id": "********-****-****-****-***********", "role": "********", "room_id": "************************", "room_name": "**********", "user_id": "************************", "template_id": "************************", "user_name": "********", "user_data": "", "error_message": "Peer not joined" } }

Room Events

room.end.success

This event will be sent when room end is called and then it is successful.

Attributes

NameTypeDescription
room_idstring100ms assigned room id

Example: 5f9edc6ac238215aec2312df
room_namestringRoom name provided when creating the room

Example: Test Room
session_idstring100ms assigned id to identify the session

Example: 5f9edc6bd238215aec7700df
peer_idstring100ms assigned id to identify the joining user

Example: bd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
user_idstringUser id assigned by the customer

Example: user.001
template_idstringTemplate ID of the room

Example: 66112497abcd52312556c4gg
user_namestringUser name of the user

Example: Test user
rolestringRole of the user

Example: host
lock_roomboolFlag to indicate if the room was lock

Example: false
reasonstringReason specified with end room call

Example: End Room by admin
sourcestringSource of end room api call

Example: peer
session_started_attimestamp (in UTC)Timestamp when session started

Example: 2020-11-11T16:32:17Z

Sample room.end.success event

{ "version": "2.0", "id": "********-****-****-****-***********", "account_id": "************************", "timestamp": "2021-11-25T09:10:35Z", "type": "room.end.success", "data": { "peer_id": "********-****-****-****-***********", "role": "********", "room_id": "************************", "room_name": "**********", "session_id": "************************", "template_id": "************************", "user_id": "************************", "user_name": "********", "lock_room": false, "reason": "****************", "source": "peer", "session_started_at": "2021-11-30T12:58:49.97291247Z" } }

room.end.failure

This event will be sent when room end is called and the it is unsuccessful.

Attributes

NameTypeDescription
room_idstring100ms assigned room id

Example: 5f9edc6ac238215aec2312df
room_namestringRoom name provided when creating the room

Example: Test Room
session_idstring100ms assigned id to identify the session

Example: 5f9edc6bd238215aec7700df
peer_idstring100ms assigned id to identify the joining user

Example: bd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
user_idstringUser id assigned by the customer

Example: user.001
template_idstringTemplate ID of the room

Example: 66112497abcd52312556c4gg
user_namestringUser name of the user

Example: Test user
rolestringRole of the user

Example: host
lock_roomboolFlag to indicate if the room was lock

Example: false
reasonstringReason specified with end room call

Example: End Room by admin
sourcestringSource of end room api call

Example: peer
session_started_attimestamp (in UTC)Timestamp when session started

Example: 2020-11-11T16:32:17Z
error_messagestringError message to indicate the reason of failure

Example: session not found
error_codeintError code for failure

Example: 404

Sample room.end.success event

{ "version": "2.0", "id": "********-****-****-****-***********", "account_id": "************************", "timestamp": "2021-11-25T09:10:35Z", "type": "room.end.success", "data": { "peer_id": "********-****-****-****-***********", "role": "********", "room_id": "************************", "room_name": "**********", "session_id": "************************", "template_id": "************************", "user_id": "************************", "user_name": "********", "lock_room": false, "reason": "****************", "source": "peer", "session_started_at": "2021-11-30T12:58:49.97291247Z", "error_code": 404, "error_message": "session not found" } }

Role change Events

role.change.success

This event will be sent when the role change for a peer is successful.

Attributes

NameTypeDescription
room_idstring100ms assigned room id

Example: 5f9edc6ac238215aec2312df
room_namestringRoom name provided when creating the room

Example: Test Room
session_idstring100ms assigned id to identify the session

Example: 5f9edc6bd238215aec7700df
template_idstringTemplate ID of the room

Example: 66112497abcd52312556c4gg
peer_idstring100ms assigned id to identify the joining user

Example: bd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
user_idstringUser id assigned by the customer

Example: user.001
user_namestringUser name of the user

Example: Test user
user_datastringUser data of the user

Example: {"isHandRaised":true}
previous_rolestringPrevious role of the peer

Example: host
rolestringNew role of the user

Example: host
joined_attimestamp (in UTC)Timestamp when user joined

Example: 2020-11-11T16:32:17Z
session_started_attimestamp (in UTC)Timestamp when session started

Example: 2020-11-11T16:32:17Z
role_changed_attimestamp (in UTC)Timestamp when role changed

Example: 2020-10-11T16:32:17Z

Sample role.change.success event

{ "version": "2.0", "id": "********-****-****-****-***********", "account_id": "************************", "app_id": "************************", "timestamp": "2021-11-30T12:58:49Z", "type": "role.change.success", "data": { "joined_at": "2021-11-30T12:58:49.97291247Z", "peer_id": "********-****-****-****-***********", "role": "********", "room_id": "************************", "room_name": "**********", "session_id": "************************", "template_id": "************************", "user_id": "************************", "user_name": "********", "user_data": "", "previous_role": "********", "session_started_at": "2021-11-30T12:48:49.97291247Z", "role_changed_at": "2021-11-30T12:58:49.97291247Z" } }

role.change.failure

This event will be sent when the role change for a peer fails. For example:

  1. When there's an attempt to change peer's role to a specific role whose limit has already been reached.

Attributes

NameTypeDescription
room_idstring100ms assigned room id

Example: 5f9edc6ac238215aec2312df
room_namestringRoom name provided when creating the room

Example: Test Room
session_idstring100ms assigned id to identify the session

Example: 5f9edc6bd238215aec7700df
template_idstringTemplate ID of the room

Example: 66112497abcd52312556c4gg
peer_idstring100ms assigned id to identify the joining user

Example: bd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
user_idstringUser id assigned by the customer

Example: user.001
user_namestringUser name of the user

Example: Test user
user_datastringUser data of the user

Example: {"isHandRaised":true}
rolestringNew role of the user

Example: host
joined_attimestamp (in UTC)Timestamp when user joined

Example: 2020-11-11T16:32:17Z
session_started_attimestamp (in UTC)Timestamp when session started

Example: 2020-11-11T16:32:17Z
error_messagestringRole change error message (description)

Example: role limit reached

Sample role.change.failure event

{ "version": "2.0", "id": "********-****-****-****-***********", "account_id": "************************", "app_id": "************************", "timestamp": "2021-11-30T12:58:49Z", "type": "role.change.failure", "data": { "peer_id": "********-****-****-****-***********", "role": "********", "room_id": "************************", "room_name": "**********", "session_id": "************************", "template_id": "************************", "user_id": "************************", "user_name": "********", "user_data": "", "session_started_at": "2021-11-30T12:48:49.97291247Z", "joined_at": "2021-11-30T12:58:49.97291247Z", "error_message": "role limit reached" } }

SFU Recording Events

recording.success

This event will be sent when final composed recording is generated and uploaded to the destination

Attributes

NameTypeDescription
room_idstring100ms assigned room id

Example: 5f9edc6ac238215aec2312df
room_namestringRoom name assigned by you when creating room

Example: class-9-batch-2
session_idstring100ms assigned id to identify the session

Example: 5f9edc6bd238215aec7700df
template_idstringTemplate ID of the room

Example: 66112497abcd52312556c4gg
locationstring(Deprecated, use recordingpath) s3 URI of the recorded video

_Example: s3://bucket/prefix/ac.mp4
URLstring(Deprecated, use recordingpresigned_url) Presigned s3 URL for the recorded video, for download

_Example: https://s3-location/bucket/ac.mp4
durationintDuration the user spent in the room in seconds

Example: 3600
recording_pathstringUpload path of the recorded video such as s3 URI

Example: s3://bucket/prefix/ac.mp4
recording_presigned_urlstringPresigned s3 URL for the recorded video, for download. Valid for 24 hours

Example: https://s3-location/bucket/ac.mp4
sizeintSize of the recorded video (in bytes)

Example: 10024
session_started_attimestamp (in UTC)Timestamp when session started

Example: 2020-11-11T16:32:17Z
session_stopped_attimestamp (in UTC)Timestamp when session ended

Example: 2020-11-11T16:32:17Z

Sample recording.success event

{ "version": "1.0", "id": "********-****-****-****-***********", "app_id": "************************", "account_id": "************************", "timestamp": "2021-11-30T20:12:35Z", "type": "recording.success", "data": { "duration": 600, "room_id": "************************", "room_name": "TestRoom1", "session_id": "************************", "template_id": "************************", "recording_path": "s3://<file-bucket-address>.mp4", "recording_presigned_url": "https://<file-access-url>?<signature>", "size": 13933649, "session_started_at": "2021-11-30T12:48:49.97291247Z", "session_stopped_at": "2021-11-30T12:58:49.97291247Z" } }

recording.failed

This event will be sent when failure occurs during final recording composition or upload to storage

Attributes

NameTypeDescription
room_idstring100ms assigned room id

Example: 5f9edc6ac238215aec2312df
room_namestringRoom name assigned by you when creating room

Example: class-9-batch-2
session_idstring100ms assigned id to identify the session

Example: 5f9edc6bd238215aec7700df
template_idstringTemplate ID of the room

Example: 66112497abcd52312556c4gg
errorstringError message

Example: Upload Failure
session_started_attimestamp (in UTC)Timestamp when session started

Example: 2020-11-11T16:32:17Z
session_stopped_attimestamp (in UTC)Timestamp when session ended

Example: 2020-11-11T16:32:17Z

Sample recording.failed event

{ "version": "1.0", "id": "********-****-****-****-***********", "app_id": "************************", "account_id": "************************", "timestamp": "2021-11-23T09:04:25Z", "type": "recording.failed", "data": { "error": "Upload Failure", "room_id": "************************", "room_name": "TestRoom1", "session_id": "************************", "template_id": "************************", "session_started_at": "2021-11-30T12:48:49.97291247Z", "session_stopped_at": "2021-11-30T12:58:49.97291247Z" } }

RTMP Streaming & Browser Recording Events

beam.started.success

This event is sent when RTMP streaming and/or browser recording is successfully triggered

Attributes

NameTypeDescription
beam_idstringUnique beam id

Example: 61d3def54b616982bd80ed83
job_idstringBeam job id

Example: 60b8e1d96eb86d8101b57359
recording_enabledboolIndicates whether recording is enabled or not

Example: true
room_idstring100ms assigned room id

Example: 5f9edc6ac238215aec2312df
peer_idstring100ms assigned id to identify the joining user

Example: bd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
session_idstring100ms assigned id to identify the session

Example: 5f9edc6bd238215aec7700df
metadata_idstringWebhook metadata ID

Example: 14f350f5-18c4-46ca-8a33-71cbcc836600
template_idstringTemplate ID of the room

Example: 66112497abcd52312556c4gg
metadata_timestamptimestamp (in UTC)Webhook message creation timestamp

Example: 2020-11-11T17:32:17Z
start_delayintTime taken by beam to start recording

Example: 12
state_namestringBeam state identifier

Example: Started
state_timestamptimestamp (in UTC)Timestamp at which beam state changed

Example: 2020-11-11T17:32:18Z
max_widthintMaximum width of the screen supported for streaming / recording in pixels

Example: 1280
max_heightintMaximum height of the screen supported for streaming / recording in pixels

Example: 720
meeting_urlstringmeeting_url provided at rtmp start

Example: "https://app.100ms.live/room_id"
rtmparrayList of RTMP objects provided at rtmp start

Example: [{"url": "http://test.com"}]
session_started_attimestamp (in UTC)Timestamp when session started

Example: 2020-11-11T16:32:17Z

Sample beam.started.success event

{ "version": "2.0", "id": "********-****-****-****-***********", "account_id": "************************", "timestamp": "2021-11-30T12:58:46Z", "type": "beam.started.success", "data": { "beam_id": "************************", "job_id": "************************", "metadata_id": "********-****-****-****-***********", "metadata_timestamp": "2021-11-30T12:58:46.400759043Z", "peer_id": "********-****-****-****-***********", "recording_enabled": true, "room_id": "************************", "session_id": "************************", "template_id": "************************", "start_delay": 12, "state_name": "Started", "state_timestamp": "2021-11-30T12:58:46.385555859Z", "max_width": 1280, "max_height": 720, "meeting_url": "https://app.100ms.live/preview/rpe-pwl-akt?token=beam_recording", "rtmp": [{ "url": "http://test.com" }], "session_started_at": "2021-11-30T12:58:49.97291247Z" } }

beam.stopped.success

This event is sent when RTMP streaming and/or browser recording is successfully stopped

Attributes

NameTypeDescription
beam_idstringUnique beam id

Example: 61d3def54b616982bd80ed83
job_idstringBeam job id

Example: 60b8e1d96eb86d8101b57359
recording_enabledboolIndicates whether recording is enabled or not

Example: true
room_idstring100ms assigned room id

Example: 5f9edc6ac238215aec2312df
peer_idstring100ms assigned id to identify the joining user

Example: bd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
session_idstring100ms assigned id to identify the session

Example: 5f9edc6bd238215aec7700df
metadata_idstringWebhook metadata ID

Example: 14f350f5-18c4-46ca-8a33-71cbcc836600
template_idstringTemplate ID of the room

Example: 66112497abcd52312556c4gg
metadata_timestamptimestamp (in UTC)Webhook message creation timestamp

Example: 2020-11-11T17:32:17Z
state_namestringBeam state identifier

Example: Stopped
state_timestamptimestamp (in UTC)Timestamp at which beam state changed

Example: 2020-11-11T17:32:18Z
durationintDuration of RTMP streaming / recording in seconds

Example: 12
max_widthintMaximum width of the screen supported for streaming / recording in pixels

Example: 1280
max_heightintMaximum height of the screen supported for streaming / recording in pixels

Example: 720
meeting_urlstringmeeting_url provided at rtmp start

Example: "https://app.100ms.live/room_id"
rtmparrayList of RTMP objects provided at rtmp start

Example: [{"url": "http://test.com"}]
session_started_attimestamp (in UTC)Timestamp when session started

Example: 2020-11-11T16:32:17Z

Sample beam.stopped.success event

{ "version": "2.0", "id": "********-****-****-****-***********", "account_id": "************************", "timestamp": "2021-11-30T12:59:57Z", "type": "beam.stopped.success", "data": { "beam_id": "************************", "job_id": "************************", "metadata_id": "********-****-****-****-***********", "metadata_timestamp": "2021-11-30T12:59:57.797972469Z", "peer_id": "********-****-****-****-***********", "recording_enabled": true, "room_id": "************************", "session_id": "************************", "template_id": "************************", "state_name": "Stopped", "state_timestamp": "2021-11-30T12:59:57.685503281Z", "duration": 56, "max_height": 720, "max_width": 1280, "meeting_url": "https://app.100ms.live/preview/rpe-pwl-akt?token=beam_recording", "rtmp": [{ "url": "http://test.com" }], "session_started_at": "2021-11-30T12:58:49.97291247Z" } }

beam.recording.success

This event is sent when beam successfully records the room and uploads the video to storage

Attributes

NameTypeDescription
beam_idstringUnique beam id

Example: 61d3def54b616982bd80ed83
room_idstring100ms assigned room id

Example: 5f9edc6ac238215aec2312df
peer_idstring100ms assigned id to identify the joining user

Example: bd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
metadata_idstringWebhook metadata ID

Example: 14f350f5-18c4-46ca-8a33-71cbcc836600
metadata_timestamptimestamp (in UTC)Webhook message creation timestamp

Example: 2020-11-11T17:32:17Z
session_idstring100ms assigned id to identify the session

Example: 5f9edc6bd238215aec7700df
template_idstringTemplate ID of the room

Example: 66112497abcd52312556c4gg
created_attimestamp (in UTC)Timestamp at which recording was created

Example: 2020-11-11T17:12:17Z
durationintDuration of beam recording (seconds)

Example: 79
locationstring(Deprecated, use recordingpresigned_url) HTTPS url to recorded session file on S3 bucket

_Example: https://s3-loc/bucket/beam/ac.mp4
started_attimestamp (in UTC)Beam recording started at

Example: 2020-11-11T17:12:27Z
stopped_attimestamp (in UTC)Beam recording stopped at

Example: 2020-11-11T17:32:15Z
max_widthintMaximum width of the screen supported for recording in pixels

Example: 1280
max_heightintMaximum height of the screen supported for recording in pixels

Example: 720
recording_pathstringUpload path of the recorded video such as s3 URI

Example: s3://bucket/prefix/ac.mp4
recording_presigned_urlstringPresigned s3 URL for the recorded video, for download

Example: https://s3-location/bucket/ac.mp4
meeting_urlstringmeeting_url provided at rtmp start

Example: "https://app.100ms.live/room_id"
rtmparrayList of RTMP objects provided at rtmp start

Example: [{"url": "http://test.com"}]
session_started_attimestamp (in UTC)Timestamp when session started

Example: 2020-11-11T16:32:17Z

Sample beam.recording.success event

{ "version": "2.0", "id": "********-****-****-****-***********", "account_id": "************************", "timestamp": "2021-11-30T12:59:57Z", "type": "beam.recording.success", "data": { "beam_id": "************************", "created_at": "2021-11-30T12:59:57.672493658Z", "duration": 79, "metadata_id": "********-****-****-****-***********", "metadata_timestamp": "2021-11-30T12:59:57.679491494Z", "peer_id": "********-****-****-****-***********", "recording_path": "s3://bucket/prefix/ac.mp4", "recording_presigned_url": "https://<file access URL>", "room_id": "************************", "started_at": "2021-11-30T12:58:34.051Z", "stopped_at": "2021-11-30T12:59:56.778Z", "session_id": "************************", "template_id": "************************", "max_height": 720, "max_width": 1280, "meeting_url": "https://app.100ms.live/preview/rpe-pwl-akt?token=beam_recording", "rtmp": [{ "url": "http://test.com" }], "session_started_at": "2021-11-30T12:58:49.97291247Z" } }

beam.failure

This event will be sent when there are failures in RTMP streaming and/or browser recording. This can occur when,

  1. Invalid RTMP URL
  2. Browser failed to load the web-app
  3. Incorrect storage (S3) credentials
  4. Other unexpected errors

Attributes

NameTypeDescription
beam_idstringUnique beam id

Example: 61d3def54b616982bd80ed83
job_idstringBeam job id

Example: 60b8e1d96eb86d8101b57359
recording_enabledboolIndicates whether recording is enabled or not

Example: true
room_idstring100ms assigned room id

Example: 5f9edc6ac238215aec2312df
peer_idstring100ms assigned id to identify the joining user

Example: bd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
session_idstring100ms assigned id to identify the session

Example: 5f9edc6bd238215aec7700df
template_idstringTemplate ID of the room

Example: 66112497abcd52312556c4gg
error_codeintBeam error code

Example: 1
error_messagestringBeam error message (description)

Example: Failed to resolve hostname
error_typestringBeam error type

Example: BeamFailed
metadata_idstringWebhook metadata ID

Example: 14f350f5-18c4-46ca-8a33-71cbcc836600
metadata_timestamptimestamp (in UTC)Webhook message creation timestamp

Example: 2020-11-11T17:32:17Z
state_namestringBeam state identifier

Example: Failed
state_timestamptimestamp (in UTC)Timestamp at which beam state changed

Example: 2020-11-11T17:32:18Z
durationintDuration of RTMP streaming / recording in seconds

Example: 12
max_widthintMaximum width of the screen supported for streaming / recording in pixels

Example: 1280
max_heightintMaximum height of the screen supported for streaming / recording in pixels

Example: 720
meeting_urlstringmeeting_url provided at rtmp start

Example: "https://app.100ms.live/room_id"
rtmparrayList of RTMP objects provided at rtmp start

Example: [{"url": "http://test.com"}]
session_started_attimestamp (in UTC)Timestamp when session started

Example: 2020-11-11T16:32:17Z

Sample beam.failure event

{ "version": "2.0", "id": "********-****-****-****-***********", "account_id": "************************", "timestamp": "2021-11-30T20:36:55Z", "type": "beam.failure", "data": { "beam_id": "************************", "error_code": 1, "error_message": "[tcp @ 0x55f6cc5f5780] Failed to resolve hostname rvs-isr: Name or service not known", "error_type": "BeamFailed", "job_id": "************************", "metadata_id": "********-****-****-****-***********", "metadata_timestamp": "2021-11-30T20:36:55.807155801Z", "peer_id": "********-****-****-****-***********", "recording_enabled": true, "room_id": "************************", "session_id": "************************", "template_id": "************************", "state_message": "[tcp @ 0x55f6cc5f5780] Failed to resolve hostname rvs-isr: Name or service not known", "state_name": "Failed", "state_timestamp": "2021-11-30T20:36:55.799192444Z", "max_height": 720, "max_width": 1280, "meeting_url": "https://app.100ms.live/preview/rpe-pwl-akt?token=beam_recording", "rtmp": [{ "url": "http://test.com" }], "duration": 56, "session_started_at": "2021-11-30T12:58:49.97291247Z" } }

HLS Streaming Events

hls.started.success

This event is sent when HLS streaming is successfully triggered

Attributes

NameTypeDescription
beam_idstringUnique beam id

Example: 61d3def54b616982bd80ed83
job_idstringBeam job id

Example: 60b8e1d96eb86d8101b57359
recording_single_file_per_layer_enabledboolIndicates whether HLS recording should be available as separate files for various dimensions supported. Output will be Individual mp4 file per HLS layer.

Example: false
recording_vod_playlist_enabledboolIndicates whether Video on Demand is enabled or not. Output will be a ZIP file of m3u8 format with all the chunks.

Example: false
room_idstring100ms assigned room id

Example: 5f9edc6ac238215aec2312df
peer_idstring100ms assigned id to identify the joining user

Example: bd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
session_idstring100ms assigned id to identify the session

Example: 5f9edc6bd238215aec7700df
template_idstringTemplate ID of the room

Example: 66112497abcd52312556c4gg
meeting_urlstringmeeting_url provided at HLS start

Example: "https://app.100ms.live/room_id"
metadata_idstringWebhook metadata ID

Example: 14f350f5-18c4-46ca-8a33-71cbcc836600
metadata_timestamptimestamp (in UTC)Webhook message creation timestamp

Example: 2020-11-11T17:32:17Z
start_delayintTime taken by beam to start streaming

Example: 12
state_namestringBeam state identifier

Example: HLSStarted
state_timestamptimestamp (in UTC)Timestamp at which beam state changed

Example: 2020-11-11T17:32:18Z
max_widthintMaximum width of the screen supported for streaming / recording in pixels

Example: 1280
max_heightintMaximum height of the screen supported for streaming / recording in pixels

Example: 720
urlstringHLS live streaming url

Example: https://100ms-live.m3u8
started_attimestamp (in UTC)Timestamp at which HLS started

Example: 2020-11-11T17:32:18Z
session_started_attimestamp (in UTC)Timestamp when session started

Example: 2020-11-11T16:32:17Z

Sample hls.started.success event

{ "version": "2.0", "id": "********-****-****-****-***********", "account_id": "************************", "timestamp": "2021-11-30T12:58:46Z", "type": "hls.started.success", "data": { "beam_id": "************************", "job_id": "************************", "metadata_id": "********-****-****-****-***********", "metadata_timestamp": "2021-11-30T12:58:46.400759043Z", "peer_id": "********-****-****-****-***********", "recording_single_file_per_layer_enabled": false, "recording_vod_playlist_enabled": false, "room_id": "************************", "meeting_url": "https://app.100ms.live/preview/rpe-pwl-akt?token=beam_recording", "session_id": "************************", "template_id": "************************", "start_delay": 12, "state_name": "HLSStarted", "state_timestamp": "2021-11-30T12:58:46.385555859Z", "max_width" : 1280, "max_height": 720, "url": "https://100ms-live.m3u8", "started_at": "2021-11-30T12:58:46.400759043Z", "session_started_at": "2021-11-30T12:58:49.97291247Z" } }

hls.stopped.success

This event is sent when HLS streaming is successfully stopped

Attributes

NameTypeDescription
beam_idstringUnique beam id

Example: 61d3def54b616982bd80ed83
job_idstringBeam job id

Example: 60b8e1d96eb86d8101b57359
recording_single_file_per_layer_enabledboolIndicates whether HLS recording should be available as separate files for various dimensions supported. Output will be Individual mp4 file per HLS layer.

Example: false
recording_vod_playlist_enabledboolIndicates whether Video on Demand is enabled or not. Output will be a ZIP file of m3u8 format with all the chunks.

Example: false
room_idstring100ms assigned room id

Example: 5f9edc6ac238215aec2312df
peer_idstring100ms assigned id to identify the joining user

Example: bd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
session_idstring100ms assigned id to identify the session

Example: 5f9edc6bd238215aec7700df
template_idstringTemplate ID of the room

Example: 66112497abcd52312556c4gg
max_widthintMaximum width of the screen supported for HLS streaming / recording in pixels

Example: 1280
max_heightintMaximum height of the screen supported for HLS streaming / recording in pixels

Example: 720
meeting_urlstringmeeting_url provided at HLS start

Example: "https://app.100ms.live/room_id"
metadata_idstringWebhook metadata ID

Example: 14f350f5-18c4-46ca-8a33-71cbcc836600
metadata_timestamptimestamp (in UTC)Webhook message creation timestamp

Example: 2020-11-11T17:32:17Z
state_namestringBeam state identifier

Example: HLSStopped
state_timestamptimestamp (in UTC)Timestamp at which beam state changed

Example: 2020-11-11T17:32:18Z
urlstringHLS live streaming url

Example: https://100ms-live.m3u8
durationintDuration of HLS streaming in seconds

Example: 12
started_attimestamp (in UTC)Timestamp at which HLS started

Example: 2020-11-11T17:32:18Z
stopped_attimestamp (in UTC)Timestamp at which HLS stopped

Example: 2020-11-11T17:32:18Z
session_started_attimestamp (in UTC)Timestamp when session started

Example: 2020-11-11T16:32:17Z

Sample hls.stopped.success event

{ "version": "2.0", "id": "********-****-****-****-***********", "account_id": "************************", "timestamp": "2021-11-30T12:59:57Z", "type": "hls.stopped.success", "data": { "beam_id": "************************", "job_id": "************************", "metadata_id": "********-****-****-****-***********", "metadata_timestamp": "2021-11-30T12:59:57.797972469Z", "peer_id": "********-****-****-****-***********", "recording_single_file_per_layer_enabled": false, "recording_vod_playlist_enabled": false, "room_id": "************************", "max_height": 720, "max_width": 1280, "meeting_url": "https://app.100ms.live/preview/rpe-pwl-akt?token=beam_recording", "session_id": "************************", "template_id": "************************", "state_name": "HLSStopped", "state_timestamp": "2021-11-30T12:59:57.685503281Z", "duration": 56, "started_at": "2021-11-30T12:59:57.797972469Z", "stopped_at": "2021-11-30T12:59:57.797972469Z", "session_started_at": "2021-11-30T12:58:49.97291247Z" } }

hls.failure

This event will be sent when there are failures in HLS streaming and/or recording. This can occur when,

  1. The meeting_url is invalid
  2. Other unexpected errors with HLS streaming / recording.

Attributes

NameTypeDescription
beam_idstringUnique beam id

Example: 61d3def54b616982bd80ed83
job_idstringBeam job id

Example: 60b8e1d96eb86d8101b57359
recording_single_file_per_layer_enabledboolIndicates whether HLS recording should be available as separate files for various dimensions supported. Output will be Individual mp4 file per HLS layer.

Example: false
recording_vod_playlist_enabledboolIndicates whether Video on Demand is enabled or not. Output will be a ZIP file of m3u8 format with all the chunks.

Example: false
room_idstring100ms assigned room id

Example: 5f9edc6ac238215aec2312df
peer_idstring100ms assigned id to identify the joining user

Example: bd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
session_idstring100ms assigned id to identify the session

Example: 5f9edc6bd238215aec7700df
template_idstringTemplate ID of the room

Example: 66112497abcd52312556c4gg
max_widthintMaximum width of the screen supported for HLS streaming / recording in pixels

Example: 1280
max_heightintMaximum height of the screen supported for HLS streaming / recording in pixels

Example: 720
meeting_urlstringmeeting_url provided at HLS start

Example: "https://app.100ms.live/room_id"
error_codeintBeam error code

Example: 1
error_messagestringBeam error message (description)

Example: Beam failed with unknown error
error_typestringBeam error type

Example: BeamFailed
metadata_idstringWebhook metadata ID

Example: 14f350f5-18c4-46ca-8a33-71cbcc836600
metadata_timestamptimestamp (in UTC)Webhook message creation timestamp

Example: 2020-11-11T17:32:17Z
state_namestringBeam state identifier

Example: HLSFailed
state_timestamptimestamp (in UTC)Timestamp at which beam state changed

Example: 2020-11-11T17:32:18Z
durationintDuration of HLS streaming in seconds

Example: 12
session_started_attimestamp (in UTC)Timestamp when session started

Example: 2020-11-11T16:32:17Z

Sample hls.failure event

{ "version": "2.0", "id": "********-****-****-****-***********", "account_id": "************************", "timestamp": "2021-11-30T20:36:55Z", "type": "hls.failure", "data": { "beam_id": "************************", "error_code": 1, "error_message": "Beam failed with unknown error", "error_type": "BeamFailed", "job_id": "************************", "metadata_id": "********-****-****-****-***********", "metadata_timestamp": "2021-11-30T20:36:55.807155801Z", "peer_id": "********-****-****-****-***********", "recording_single_file_per_layer_enabled": false, "recording_vod_playlist_enabled": false, "room_id": "************************", "max_height": 720, "max_width": 1280, "meeting_url": "https://app.100ms.live/preview/rpe-pwl-akt?token=beam_recording", "session_id": "************************", "template_id": "************************", "state_name": "HLSFailed", "state_timestamp": "2021-11-30T20:36:55.799192444Z", "duration": 56, "session_started_at": "2021-11-30T12:58:49.97291247Z" } }

hls.recording.success

This event will be sent when HLS recordings are successful and uploaded to the storage

Attributes

NameTypeDescription
beam_idstringUnique beam id

Example: 61d3def54b616982bd80ed83
room_idstring100ms assigned room id

Example: 5f9edc6ac238215aec2312df
metadata_idstringWebhook metadata ID

Example: 14f350f5-18c4-46ca-8a33-71cbcc836600
metadata_timestamptimestamp (in UTC)Webhook message creation timestamp

Example: 2020-11-11T17:32:17Z
durationintDuration of HLS recording in seconds

Example: 12
session_idstring100ms assigned id to identify the session

Example: 5f9edc6bd238215aec7700df
template_idstringTemplate ID of the room

Example: 66112497abcd52312556c4gg
hls_vod_recording_pathstringUpload path of the HLS vod playlist such as s3 URI

Example: s3://bucket/prefix/ac.mp4
hls_vod_recording_presigned_urlstringPre signed url for HLS vod playlist url

Example: https://s3-location/bucket/hls-vod.zip
max_widthintMaximum width of the screen supported for HLS recording in pixels

Example: 1280
max_heightintMaximum height of the screen supported for HLS recording in pixels

Example: 720
meeting_urlstringmeeting_url provided at HLS start

Example: "https://app.100ms.live/room_id"
recording_created_attimestamp (in UTC)Timestamp at which recording was created

Example: 2020-11-11T17:12:17Z
started_attimestamp (in UTC)Timestamp at which HLS started

Example: 2020-11-11T17:32:18Z
stopped_attimestamp (in UTC)Timestamp at which HLS stopped

Example: 2020-11-11T17:32:18Z
recording_single_filesarrayList of recording details per layer. layer="0" is the highest quality layer

Example: < see below >
recording_hls_vod_playlist_locationstring(Deprecated, use hlsvod_recording_presigned_url) Pre signed url for HLS vod playlist url.

_Example: < see below >
recording_thumbnailsarrayList of thumbnails generated

Example: < see below >
session_started_attimestamp (in UTC)Timestamp when session started

Example: 2020-11-11T16:32:17Z

Sample hls.recording.success event

{ "version": "2.0", "id": "********-****-****-****-***********", "account_id": "************************", "timestamp": "2021-11-30T20:36:55Z", "type": "hls.recording.success", "data": { "beam_id": "************************", "session_id": "************************", "template_id": "************************", "metadata_id": "********-****-****-****-***********", "metadata_timestamp": "2021-11-30T20:36:55.807155801Z", "room_id": "************************", "duration": 56, "max_height": 720, "max_width": 1280, "meeting_url": "https://app.100ms.live/preview/rpe-pwl-akt?token=beam_recording", "hls_vod_recording_path": "s3://<hls-vod-bucket-address>.zip", "hls_vod_recording_presigned_url": "https://<hls-vod-access-url>?<signature>", "recording_single_files": [ { "layer": "0", "recording_path": "s3://<file-0-bucket-address>.mp4", "recording_presigned_url": "https://<file-0-access-url>?<signature-0>" }, { "layer": "1", "recording_path": "s3://<file-1-bucket-address>.mp4", "recording_presigned_url": "https://<file-1-access-url>?<signature-1>" }, { "layer": "2", "recording_path": "s3://<file-2-bucket-address>.mp4", "recording_presigned_url": "https://<file-2-access-url>?<signature-2>" }, { "layer": "3", "recording_path": "s3://<file-3-bucket-address>.mp4", "recording_presigned_url": "https://<file-3-access-url>?<signature-3>" } ], "recording_thumbnails": [ { "width": 1280, "height": 720, "offset": 60, "location": "s3://<thumbnail-file-bucket-address>.png", "url": "https://<thumbnail-access-url>?<signature3>" } ], "recording_created_at": "2021-11-30T12:59:57.672493658Z", "started_at": "2021-11-30T12:59:57.797972469Z", "stopped_at": "2021-11-30T12:59:57.797972469Z", "session_started_at": "2021-11-30T12:58:49.97291247Z" } }


Run in postman