Webhook

Introduction

Webhook is an HTTP(S) endpoint used for pushing the notifications to your application. It will be invoked by 100ms servers to notify events of your room.

Requirements

Webhook MUST implement POST HTTP method for receiving notifications. 100ms notifications are in JSON format so it should be handled accordingly.

Additionally, you can specify headers which 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

Webhook

Events

Event is a JSON dictionary which has the following keys.

Event Attributes

NameTypeDescriptionExample
versionstringVersion of the event2.0
idstringId of the eventbd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
app_idstringApp ID from which this event is generated5ff5881b80b66969e1fb35f6
account_idstringCustomer ID from which this event is generated5ff5881b80b66969e1fb35f4
timestamptimestampTimestamp of the event2020-11-11T16:32:17Z
typestringType of the eventpeer.join.success
datadictEvent data. Its keys will be different for different type of event.< 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", "user_id": "user.001", "user_name": "test user" } }

Session Events

session.open.success

This event will be sent when session opens successfully.

Attributes

NameTypeDescriptionExample
room_idstring100ms assigned room id5f9edc6ac238215aec2312df
room_namestringRoom name provided when creating the roomTest Room
session_idstring100ms assigned id to identify the session5f9edc6bd238215aec7700df
session_started_attimestampTimestamp when session started2020-11-11T16:32:17Z

Sample session.open.success event

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

session.close.success

This event will be sent when session closes successfully.

Attributes

NameTypeDescriptionExample
room_idstring100ms assigned room id5f9edc6ac238215aec2312df
room_namestringRoom name provided when creating the roomTest Room
session_idstring100ms assigned id to identify the session5f9edc6bd238215aec7700df
session_started_attimestampTimestamp when session started2020-11-11T16:32:17Z

Sample session.close.success event

{ "version": "2.0", "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "account_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "app_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "timestamp": "2021-11-30T12:58:49Z", "type": "session.close.success", "data": { "room_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "room_name": "xxxxxxxxxx", "session_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "session_started_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

NameTypeDescriptionExample
room_idstring100ms assigned room id5f9edc6ac238215aec2312df
room_namestringRoom name provided when creating the roomTest Room
session_idstring100ms assigned id to identify the session5f9edc6bd238215aec7700df
peer_idstring100ms assigned id to identify the joining userbd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
user_idstringUser id assigned by the customeruser.001
user_namestringUser name of the joining userTest user
user_datastringUser data of the joining user{"isHandRaised":true}
rolestringRole of the joining userhost
joined_attimestampTimestamp when user joined2020-11-11T16:32:17Z
session_started_attimestampTimestamp when session started2020-11-11T16:32:17Z

Sample peer.join.success event

{ "version": "2.0", "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "account_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "timestamp": "2021-11-30T12:58:49Z", "type": "peer.join.success", "data": { "joined_at": "2021-11-30T12:58:49.97291247Z", "peer_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "role": "xxxxxxxx", "room_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "room_name": "xxxxxxxxxx", "session_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "user_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "user_name": "xxxxxxxx", "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

NameTypeDescriptionExample
room_idstring100ms assigned room id5f9edc6ac238215aec2312df
room_namestringRoom name provided when creating the roomTest Room
session_idstring100ms assigned id to identify the session5f9edc6bd238215aec7700df
peer_idstring100ms assigned id to identify the joining userbd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
user_idstringUser id assigned by the customeruser.001
user_namestringUser name of the userTest user
user_datastringUser data of the user{"isHandRaised":true}
rolestringRole of the userhost
left_attimestampTimestamp when user left2020-11-11T17:32:17Z
durationnumberDuration the user spent in the room in seconds36000
reasonstringReason for the peer leaving, see more details belowclient request
session_started_attimestampTimestamp when session started2020-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": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "account_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "timestamp": "2021-11-30T12:58:58Z", "type": "peer.leave.success", "data": { "duration": 40, "left_at": "2021-11-30T12:58:58.500451704Z", "peer_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "role": "xxxxxxxx", "room_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "room_name": "xxxxxxxxxx", "session_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "user_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "user_name": "xxxxxxxx", "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

NameTypeDescriptionExample
room_idstring100ms assigned room id5f9edc6ac238215aec2312df
room_namestringRoom name provided when creating the roomTest Room
peer_idstring100ms assigned id to identify the joining userbd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
user_idstringUser id assigned by the customeruser.001
user_namestringUser name of the userTest user
user_datastringUser data of the user{"isHandRaised":true}
rolestringRole of the userhost
joined_attimestampTimestamp when user joined2020-11-11T16:32:17Z
error_messagestringReason for failurePeer not joined
session_started_attimestampTimestamp when session started2020-11-11T16:32:17Z

Peer join failure Reason

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

Sample peer.join.failure event

{ "version": "2.0", "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "account_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "timestamp": "2021-11-25T09:10:35Z", "type": "peer.join.failure", "data": { "joined_at": "0001-01-01T00:00:00Z", "peer_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "role": "xxxxxxxx", "room_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "room_name": "xxxxxxxxxx", "user_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "user_name": "xxxxxxxx", "user_data": "", "error_message": "role not allowed", "session_started_at": "2021-11-30T12:58:49.97291247Z" } }

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

NameTypeDescriptionExample
room_idstring100ms assigned room id5f9edc6ac238215aec2312df
room_namestringRoom name provided when creating the roomTest Room
peer_idstring100ms assigned id to identify the joining userbd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
user_idstringUser id assigned by the customeruser.001
user_namestringUser name of the userTest user
user_datastringUser data of the user{"isHandRaised":true}
rolestringRole of the userhost
left_attimestampTimestamp when user left2020-11-11T17:32:17Z
durationnumberDuration the user spent in the room in seconds36000
error_messagestringReason for failurePeer not joined
session_started_attimestampTimestamp when session started2020-11-11T16:32:17Z

Peer leave failure Reason

  1. peer not joined

Sample peer.leave.failure event

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

Room Events

room.end.success

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

Attributes

NameTypeDescriptionExample
room_idstring100ms assigned room id5f9edc6ac238215aec2312df
room_namestringRoom name provided when creating the roomTest Room
session_idstring100ms assigned id to identify the session5f9edc6bd238215aec7700df
peer_idstring100ms assigned id to identify the joining userbd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
user_idstringUser id assigned by the customeruser.001
user_namestringUser name of the userTest user
rolestringRole of the userhost
lock_roomboolFlag to indicate if the room was lockfalse
reasonstringReason specified with end room callEnd Room by admin
sourcestringSource of end room api callpeer
session_started_attimestampTimestamp when session started2020-11-11T16:32:17Z

Sample room.end.success event

{ "version": "2.0", "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "account_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "timestamp": "2021-11-25T09:10:35Z", "type": "room.end.success", "data": { "joined_at": "0001-01-01T00:00:00Z", "peer_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "role": "xxxxxxxx", "room_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "room_name": "xxxxxxxxxx", "session_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "user_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "user_name": "xxxxxxxx", "lock_room": false, "reason": "xxxxxxxxxxxxxxxx", "source": "peer", "session_started_at": "2021-11-30T12:58:49.97291247Z" } }

SFU Recording Events

recording.success

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

Attributes

NameTypeDescriptionExample
room_idstring100ms assigned room id5f9edc6ac238215aec2312df
room_namestringRoom name assigned by you when creating roomclass-9-batch-2
session_idstring100ms assigned id to identify the session5f9edc6bd238215aec7700df
locationstrings3 URI of the recorded videos3://bucket/prefix/ac.mp4
URLstringPresigned s3 URL for the recorded video, for download. Valid for 24 hourshttps://s3-location/bucket/ac.mp4
durationnumberDuration the user spent in the room in seconds3600
sizenumberSize of the recorded video (in bytes)10024
session_started_attimestampTimestamp when session started2020-11-11T16:32:17Z

Sample recording.success event

{ "version": "1.0", "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "app_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "account_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "timestamp": "2021-11-30T20:12:35Z", "type": "recording.success", "data": { "URL": "https://<file-access-url>?<signature>", "duration": 351, "location": "s3://<file-bucket-address>.mp4", "room_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "room_name": "TestRoom1", "session_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "size": 13933649, "session_started_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

NameTypeDescriptionExample
room_idstring100ms assigned room id5f9edc6ac238215aec2312df
room_namestringRoom name assigned by you when creating roomclass-9-batch-2
session_idstring100ms assigned id to identify the session5f9edc6bd238215aec7700df
errorstringError messageUpload Failure
session_started_attimestampTimestamp when session started2020-11-11T16:32:17Z

Sample recording.failed event

{ "version": "1.0", "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "app_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "account_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "timestamp": "2021-11-23T09:04:25Z", "type": "recording.failed", "data": { "error": "Upload Failure", "room_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "room_name": "TestRoom1", "session_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "session_started_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

NameTypeDescriptionExample
beam_idstringUnique beam id61d3def54b616982bd80ed83
job_idstringBeam job id60b8e1d96eb86d8101b57359
room_idstring100ms assigned room id5f9edc6ac238215aec2312df
peer_idstring100ms assigned id to identify the joining userbd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
session_idstring100ms assigned id to identify the session5f9edc6bd238215aec7700df
metadata_idstringWebhook metadata ID14f350f5-18c4-46ca-8a33-71cbcc836600
metadata_timestamptimestampWebhook message creation timestamp2020-11-11T17:32:17Z
start_delaynumberTime taken by beam to start recording12
state_namestringBeam state identifierStarted
state_timestamptimestampTimestamp at which beam state changed2020-11-11T17:32:18Z
session_started_attimestampTimestamp when session started2020-11-11T16:32:17Z

Sample beam.started.success event

{ "version": "2.0", "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "account_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "timestamp": "2021-11-30T12:58:46Z", "type": "beam.started.success", "data": { "beam_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "job_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "metadata_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "metadata_timestamp": "2021-11-30T12:58:46.400759043Z", "peer_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "room_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "session_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "start_delay": 12, "state_name": "Started", "state_timestamp": "2021-11-30T12:58:46.385555859Z", "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

NameTypeDescriptionExample
beam_idstringUnique beam id61d3def54b616982bd80ed83
job_idstringBeam job id60b8e1d96eb86d8101b57359
room_idstring100ms assigned room id5f9edc6ac238215aec2312df
peer_idstring100ms assigned id to identify the joining userbd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
session_idstring100ms assigned id to identify the session5f9edc6bd238215aec7700df
metadata_idstringWebhook metadata ID14f350f5-18c4-46ca-8a33-71cbcc836600
metadata_timestamptimestampWebhook message creation timestamp2020-11-11T17:32:17Z
state_namestringBeam state identifierStarted
state_timestamptimestampTimestamp at which beam state changed2020-11-11T17:32:18Z
durationnumberDuration of RTMP streaming / recording in seconds12
session_started_attimestampTimestamp when session started2020-11-11T16:32:17Z

Sample beam.stopped.success event

{ "version": "2.0", "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "account_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "timestamp": "2021-11-30T12:59:57Z", "type": "beam.stopped.success", "data": { "beam_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "job_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "metadata_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "metadata_timestamp": "2021-11-30T12:59:57.797972469Z", "peer_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "room_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "session_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "state_name": "Stopped", "state_timestamp": "2021-11-30T12:59:57.685503281Z", "duration": 56, "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

NameTypeDescriptionExample
beam_idstringUnique beam id61d3def54b616982bd80ed83
room_idstring100ms assigned room id5f9edc6ac238215aec2312df
peer_idstring100ms assigned id to identify the joining userbd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
metadata_idstringWebhook metadata ID14f350f5-18c4-46ca-8a33-71cbcc836600
metadata_timestamptimestampWebhook message creation timestamp2020-11-11T17:32:17Z
created_attimestampTimestamp at which recording was created2020-11-11T17:12:17Z
durationnumberDuration of beam recording (seconds)79
locationstringHTTPS url to recorded session file on S3 buckethttps://s3-loc/bucket/beam/ac.mp4
started_attimestampBeam recording started at2020-11-11T17:12:27Z
stopped_attimestampBeam recording stopped at2020-11-11T17:32:15Z
session_started_attimestampTimestamp when session started2020-11-11T16:32:17Z

Sample beam.recording.success event

{ "version": "2.0", "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "account_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "timestamp": "2021-11-30T12:59:57Z", "type": "beam.recording.success", "data": { "beam_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "created_at": "2021-11-30T12:59:57.672493658Z", "duration": 79, "location": "https://<file access URL>", "metadata_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "metadata_timestamp": "2021-11-30T12:59:57.679491494Z", "peer_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "room_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "started_at": "2021-11-30T12:58:34.051Z", "stopped_at": "2021-11-30T12:59:56.778Z", "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 webapp

  3. Incorrect storage (S3) credentials

  4. Other unexpected errors

Attributes

NameTypeDescriptionExample
beam_idstringUnique beam id61d3def54b616982bd80ed83
job_idstringBeam job id60b8e1d96eb86d8101b57359
room_idstring100ms assigned room id5f9edc6ac238215aec2312df
peer_idstring100ms assigned id to identify the joining userbd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
session_idstring100ms assigned id to identify the session5f9edc6bd238215aec7700df
error_codenumberBeam error code1
error_messagestringBeam error message (description)Failed to resolve hostname
error_typestringBeam error typeBeamFailed
metadata_idstringWebhook metadata ID14f350f5-18c4-46ca-8a33-71cbcc836600
metadata_timestamptimestampWebhook message creation timestamp2020-11-11T17:32:17Z
state_namestringBeam state identifierStarted
state_timestamptimestampTimestamp at which beam state changed2020-11-11T17:32:18Z
durationnumberDuration of RTMP streaming / recording in seconds12
meeting_urlstringmeeting_url provided at rtmp start"https://app.100ms.live/room_id"
rtmparrayList of RTMP objects provided at rtmp start[{"url": "http://test.com"}]
session_started_attimestampTimestamp when session started2020-11-11T16:32:17Z

Sample beam.failure event

{ "version": "2.0", "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "account_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "timestamp": "2021-11-30T20:36:55Z", "type": "beam.failure", "data": { "beam_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "error_code": 1, "error_message": "[tcp @ 0x55f6cc5f5780] Failed to resolve hostname rvs-isr: Name or service not known", "error_type": "BeamFailed", "job_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "metadata_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "metadata_timestamp": "2021-11-30T20:36:55.807155801Z", "peer_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "room_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "session_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "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", "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

NameTypeDescriptionExample
beam_idstringUnique beam id61d3def54b616982bd80ed83
job_idstringBeam job id60b8e1d96eb86d8101b57359
room_idstring100ms assigned room id5f9edc6ac238215aec2312df
peer_idstring100ms assigned id to identify the joining userbd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
session_idstring100ms assigned id to identify the session5f9edc6bd238215aec7700df
meeting_urlstringmeeting_url provided at hls start"https://app.100ms.live/room_id"
metadata_idstringWebhook metadata ID14f350f5-18c4-46ca-8a33-71cbcc836600
metadata_timestamptimestampWebhook message creation timestamp2020-11-11T17:32:17Z
start_delaynumberTime taken by beam to start streaming12
state_namestringBeam state identifierHLSStarted
state_timestamptimestampTimestamp at which beam state changed2020-11-11T17:32:18Z
urlstringHLS live streaming urlhttps://100ms-live.m3u8
started_attimestampTimestamp at which hls started2020-11-11T17:32:18Z
session_started_attimestampTimestamp when session started2020-11-11T16:32:17Z

Sample hls.started.success event

{ "version": "2.0", "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "account_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "timestamp": "2021-11-30T12:58:46Z", "type": "hls.started.success", "data": { "beam_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "job_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "metadata_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "metadata_timestamp": "2021-11-30T12:58:46.400759043Z", "peer_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "room_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "meeting_url": "https://app.100ms.live/preview/rpe-pwl-akt?token=beam_recording", "session_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "start_delay": 12, "state_name": "HLSStarted", "state_timestamp": "2021-11-30T12:58:46.385555859Z", "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

NameTypeDescriptionExample
beam_idstringUnique beam id61d3def54b616982bd80ed83
job_idstringBeam job id60b8e1d96eb86d8101b57359
room_idstring100ms assigned room id5f9edc6ac238215aec2312df
peer_idstring100ms assigned id to identify the joining userbd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
session_idstring100ms assigned id to identify the session5f9edc6bd238215aec7700df
meeting_urlstringmeeting_url provided at hls start"https://app.100ms.live/room_id"
metadata_idstringWebhook metadata ID14f350f5-18c4-46ca-8a33-71cbcc836600
metadata_timestamptimestampWebhook message creation timestamp2020-11-11T17:32:17Z
state_namestringBeam state identifierHLSStopped
state_timestamptimestampTimestamp at which beam state changed2020-11-11T17:32:18Z
urlstringHLS live streaming urlhttps://100ms-live.m3u8
durationnumberDuration of HLS streaming in seconds12
started_attimestampTimestamp at which hls started2020-11-11T17:32:18Z
stopped_attimestampTimestamp at which hls stopped2020-11-11T17:32:18Z
session_started_attimestampTimestamp when session started2020-11-11T16:32:17Z

Sample hls.stopped.success event

{ "version": "2.0", "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "account_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "timestamp": "2021-11-30T12:59:57Z", "type": "hls.stopped.success", "data": { "beam_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "job_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "metadata_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "metadata_timestamp": "2021-11-30T12:59:57.797972469Z", "peer_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "room_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "meeting_url": "https://app.100ms.live/preview/rpe-pwl-akt?token=beam_recording", "session_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "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 RTMP streaming and/or browser recording. This can occur when,

  1. Browser failed to load the webapp

  2. Other unexpected errors

Attributes

NameTypeDescriptionExample
beam_idstringUnique beam id61d3def54b616982bd80ed83
job_idstringBeam job id60b8e1d96eb86d8101b57359
room_idstring100ms assigned room id5f9edc6ac238215aec2312df
peer_idstring100ms assigned id to identify the joining userbd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
session_idstring100ms assigned id to identify the session5f9edc6bd238215aec7700df
meeting_urlstringmeeting_url provided at hls start"https://app.100ms.live/room_id"
error_codenumberBeam error code1
error_messagestringBeam error message (description)Failed to resolve hostname
error_typestringBeam error typeHLSFailed
metadata_idstringWebhook metadata ID14f350f5-18c4-46ca-8a33-71cbcc836600
metadata_timestamptimestampWebhook message creation timestamp2020-11-11T17:32:17Z
state_namestringBeam state identifierStarted
state_messagestringBeam state change messageFailed to resolve hostname
state_timestamptimestampTimestamp at which beam state changed2020-11-11T17:32:18Z
durationnumberDuration of RTMP streaming / recording in seconds12
session_started_attimestampTimestamp when session started2020-11-11T16:32:17Z

Sample hls.failure event

{ "version": "2.0", "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "account_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "timestamp": "2021-11-30T20:36:55Z", "type": "hls.failure", "data": { "beam_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "error_code": 1, "error_message": "[tcp @ 0x55f6cc5f5780] Failed to resolve hostname rvs-isr: Name or service not known", "error_type": "BeamFailed", "job_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "metadata_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "metadata_timestamp": "2021-11-30T20:36:55.807155801Z", "peer_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "room_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "meeting_url": "https://app.100ms.live/preview/rpe-pwl-akt?token=beam_recording", "session_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "state_message": "[tcp @ 0x55f6cc5f5780] Failed to resolve hostname rvs-isr: Name or service not known", "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 successfull and uploaded to the storage

Attributes

NameTypeDescriptionExample
beam_idstringUnique beam id61d3def54b616982bd80ed83
room_idstring100ms assigned room id5f9edc6ac238215aec2312df
peer_idstring100ms assigned id to identify the joining userbd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
metadata_idstringWebhook metadata ID14f350f5-18c4-46ca-8a33-71cbcc836600
metadata_timestamptimestampWebhook message creation timestamp2020-11-11T17:32:17Z
durationnumberDuration of RTMP streaming / recording in seconds12
meeting_urlstringmeeting_url provided at hls start"https://app.100ms.live/room_id"
created_attimestampTimestamp at which recording was created2020-11-11T17:12:17Z
started_attimestampTimestamp at which hls started2020-11-11T17:32:18Z
stopped_attimestampTimestamp at which hls stopped2020-11-11T17:32:18Z
recording_single_filesarrayList of recording details per layer. layer="0" is the highest quality layer< see below >
recording_hls_vod_playlist_locationstringPre signed url for hls vod playlist url< see below >
recording_thumbnailsarrayList of thumbnails generated< see below >
session_started_attimestampTimestamp when session started2020-11-11T16:32:17Z

Sample hls.recording.success event

{ "version": "2.0", "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "account_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "timestamp": "2021-11-30T20:36:55Z", "type": "hls.recording.success", "data": { "beam_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "metadata_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "metadata_timestamp": "2021-11-30T20:36:55.807155801Z", "peer_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "room_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "duration": 56, "meeting_url": "https://app.100ms.live/preview/rpe-pwl-akt?token=beam_recording", "recording_hls_vod_playlist_location": "https://<hls-vod-access-url>?<signature>", "recording_single_files": [ { "layer": "0", "location": "s3://<file-0-bucket-address>.mp4", "presigned_url": "https://<file-0-access-url>?<signature-0>" }, { "layer": "1", "location": "s3://<file-1-bucket-address>.mp4", "presigned_url": "https://<file-1-access-url>?<signature-1>" }, { "layer": "2", "location": "s3://<file-2-bucket-address>.mp4", "presigned_url": "https://<file-2-access-url>?<signature-2>" }, { "layer": "3", "location": "s3://<file-3-bucket-address>.mp4", "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>" } ], "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" } }

Role change Events

role.change.success

This event will be sent when peer changes role successfully.

Attributes

NameTypeDescriptionExample
room_idstring100ms assigned room id5f9edc6ac238215aec2312df
room_namestringRoom name provided when creating the roomTest Room
session_idstring100ms assigned id to identify the session5f9edc6bd238215aec7700df
peer_idstring100ms assigned id to identify the joining userbd0c76fd-1ab1-4d7d-ab8d-bbfa74b620c4
user_idstringUser id assigned by the customeruser.001
user_namestringUser name of the userTest user
user_datastringUser data of the user{"isHandRaised":true}
rolestringNew role of the userhost
joined_attimestampTimestamp when user joined2020-11-11T16:32:17Z
session_started_attimestampTimestamp when session started2020-11-11T16:32:17Z

Sample role.change.success event

{ "version": "2.0", "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "account_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "app_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "timestamp": "2021-11-30T12:58:49Z", "type": "role.change.success", "data": { "joined_at": "2021-11-30T12:58:49.97291247Z", "peer_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "role": "xxxxxxxx", "room_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "room_name": "xxxxxxxxxx", "session_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "user_id": "xxxxxxxxxxxxxxxxxxxxxxxx", "user_name": "xxxxxxxx", "user_data": "", "session_started_at": "2021-11-30T12:58:49.97291247Z" } }