Chat
This service records chats from viewers for the event.
Each route requires that requests authenticate with a Reactive JWT Token. Refer to our authentication documentation for how to get and use a Reactive JWT Token.
Record a chat
Add a message from a user watching the event to the event's chat feed.
Request:
POST
https://chat.reactive.live/api/v1/chats/:stream_id/messages
Parameters:
Name | Type | Required | Description |
---|---|---|---|
stream_id | string | Yes | The id of the stream you'd like a user to chat in. |
Example command:
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpcCI6IjEwNC4xNjIuOTcuMjgiLCJhdWQiOiI2OTM1MzU3YS04ZDcxLTQ1ZjItOWEwZi1kZGFlZDcwNWI0M2EiLCJzdWIiOiJBQjM1NDU3YS04ZDcxLTQ1ZjItQkUyRi1kZGFlZDcwNWI0M2EiLCJpc3MiOiJSZWFjdGl2ZSIsImlhdCI6MTYzNDkzNTQ5NCwiZXhwIjoxNjM0OTM2MDk0LCJqdGkiOiIwNzRlNDA0MS02MDg0LTQyOTItOTk2MC1jMTBlNWE1YzAwMjgifQ.o-pkrvzbTSVlzGixknSQvX1cwH1UIpx3R_fzmMpn3R8" \
--data '{"user": {"id": "1123-asdf-2134d", "first_name": "Andrew", "last_name": "C", "email": "support@reactive.live" }, "message": "Hello!"}' \
https://chat.reactive.live/api/v1/chats/6935357a-8d71-45f2-9a0f-ddaed705b43a
Response:
HTTP 201 CREATED
Allow: GET, HEAD, OPTIONS
Content-Type: application/json