Chat Rooms
List subrooms
GET https://api.video.ibm.com/channels/{channelId}/chat/rooms.json
Success response
Upon success, a response with HTTP status “200 OK” is returned with the following key-value pairs inside the rooms
root array.
KEY | TYPE | DESCRIPTION |
---|---|---|
id | string | Room ID |
name | string | Room name |
Example of a success response:
{"rooms": [{"id": "room_7dce3a5c-4ecd-4275-a4f9-c39aba521f02","name": "Artificial intelligence"}]}
Error responses
Possible error responses:
HTTP RESPONSE CODE | ERROR VALUE | ERROR CONDITIONS |
---|---|---|
401 Unauthorized | invalid_token | The provided access token is missing, revoked, expired or malformed |
402 Payment Required | invalid_request | The user does not have the streamchat benefit |
403 Forbidden | lack_of_ownership | The API user is not allowed to manage the given channel |
404 Not Found | not_found | Channel not found |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |
Add a subroom
POST https://api.video.ibm.com/channels/{channelId}/chat/rooms.json
Parameters
KEY | TYPE | IMPORTANCE | DESCRIPTION |
---|---|---|---|
name | string | REQUIRED | Name of the room |
The Content-Type of the request should be application/x-www-form-urlencoded.
Example of the request:
POST /channels/1234/chat/rooms.json HTTP/1.1Host: api.video.ibm.comAuthorization: Bearer 3c2573673b782f6544405a22636f3d5d3b6f3950Content-Type: application/x-www-form-urlencodedname=My%20room
Success response
Upon success, a response with HTTP status “200 OK” is returned with the following key-value pairs inside the room
root object.
KEY | TYPE | DESCRIPTION |
---|---|---|
id | string | Room ID |
name | string | Room name |
Example of a success response:
{"room": {"id": "room_7dce3a5c-4ecd-4275-a4f9-c39aba521f02","name": "Artificial intelligence"}}
Error responses
Possible error responses:
HTTP RESPONSE CODE | ERROR VALUE | ERROR CONDITIONS |
---|---|---|
400 Bad Request | bad_request | Invalid value was supplied |
401 Unauthorized | invalid_token | The provided access token is missing, revoked, expired or malformed |
402 Payment Required | invalid_request | The user does not have the streamchat benefit |
403 Forbidden | lack_of_ownership | The API user is not allowed to manage the given channel |
404 Not Found | not_found | Channel not found |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |
Rename a subroom
PUT https://api.video.ibm.com/channels/{channelId}/chat/rooms/{roomId}.json
Parameters
KEY | TYPE | IMPORTANCE | DESCRIPTION |
---|---|---|---|
name | string | REQUIRED | New name of the room |
The Content-Type of the request should be application/x-www-form-urlencoded.
Example of the request:
PUT /channels/1234/chat/rooms/room_7dce3a5c-4ecd-4275-a4f9-c39aba521f02.json HTTP/1.1Host: api.video.ibm.comAuthorization: Bearer 3c2573673b782f6544405a22636f3d5d3b6f3950Content-Type: application/x-www-form-urlencodedname=My%20room%20with%20a%20new%20name
Success response
Upon success, a response with HTTP status ““204” No content” is returned.
Error responses
Possible error responses:
HTTP RESPONSE CODE | ERROR VALUE | ERROR CONDITIONS |
---|---|---|
400 Bad Request | bad_request | Invalid value was supplied |
401 Unauthorized | invalid_token | The provided access token is missing, revoked, expired or malformed |
402 Payment Required | invalid_request | The user does not have the streamchat benefit |
403 Forbidden | lack_of_ownership | The API user is not allowed to manage the given channel |
404 Not Found | not_found | Channel not found |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |
Delete a subroom
DELETE https://api.video.ibm.com/channels/{channelId}/chat/rooms/{roomId}.json
Success response
Upon success, a response with HTTP status ““204” No content” is returned.
Error responses
Possible error responses:
HTTP RESPONSE CODE | ERROR VALUE | ERROR CONDITIONS |
---|---|---|
401 Unauthorized | invalid_token | The provided access token is missing, revoked, expired or malformed |
402 Payment Required | invalid_request | The user does not have the streamchat benefit |
403 Forbidden | lack_of_ownership | The API user is not allowed to manage the given channel |
404 Not Found | not_found | Channel not found |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |