diff --git a/docusaurus/video/docusaurus/docs/api/_common_/broadcast.mdx b/docusaurus/video/docusaurus/docs/api/_common_/broadcast.mdx
index 42707a86..f3b7059d 100644
--- a/docusaurus/video/docusaurus/docs/api/_common_/broadcast.mdx
+++ b/docusaurus/video/docusaurus/docs/api/_common_/broadcast.mdx
@@ -25,9 +25,8 @@ call.start_hls_broadcasting()
```bash
-curl -X POST "https://video.stream-io-api.com/video/call/${CALL_TYPE}/${CALL_ID}/start_broadcasting?api_key=${API_KEY}" \
- -H "Authorization: ${JWT_TOKEN}" \
- -H "Content-Type: application/json" \
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}/start_broadcasting?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
-H "stream-auth-type: jwt"
```
diff --git a/docusaurus/video/docusaurus/docs/api/_common_/create-call.mdx b/docusaurus/video/docusaurus/docs/api/_common_/create-call.mdx
index 873dc246..ceb36ee6 100644
--- a/docusaurus/video/docusaurus/docs/api/_common_/create-call.mdx
+++ b/docusaurus/video/docusaurus/docs/api/_common_/create-call.mdx
@@ -69,19 +69,20 @@ call.create(
```bash
-curl -X POST "https://video.stream-io-api.com/video/call/${CALL_TYPE}/${CALL_ID}?api_key=${API_KEY}" \
- -H "Authorization: ${JWT_TOKEN}" \
- -H "Content-Type: application/json" \
- -H "stream-auth-type: jwt" \
- -d '{
- "data": {
- "created_by_id": "sacha@getstream.io",
- "members": [
- { "role": "speaker", "user_id": "sacha@getstream.io" }
- ],
- "custom": { "color": "blue" }
- }
- }'
+# Gets or creates a call
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "Content-Type: application/json" \
+ -H "stream-auth-type: jwt" \
+ -d '{
+ "data": {
+ "created_by_id": "sacha@getstream.io",
+ "members": [
+ { "role": "admin", "user_id": "sacha@getstream.io" }
+ ],
+ "custom": { "color": "blue" }
+ }
+ }'
```
diff --git a/docusaurus/video/docusaurus/docs/api/_common_/go_live.mdx b/docusaurus/video/docusaurus/docs/api/_common_/go_live.mdx
index 71fc7261..f03b162d 100644
--- a/docusaurus/video/docusaurus/docs/api/_common_/go_live.mdx
+++ b/docusaurus/video/docusaurus/docs/api/_common_/go_live.mdx
@@ -18,5 +18,22 @@ call.goLive({ start_hls: true, start_recording: true });
call.go_live(start_hls=True, start_recording=True)
```
+
+
+
+
+```bash
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/livestream/${CALL_ID}/go_live?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt"
+
+# optionally start HLS broadcast and/or recording
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/livestream/${CALL_ID}/go_live?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{ "start_hls": true, "start_recording": true }'
+```
+
diff --git a/docusaurus/video/docusaurus/docs/api/_common_/manage-call-members.mdx b/docusaurus/video/docusaurus/docs/api/_common_/manage-call-members.mdx
index 4b6e844e..0a30a8c1 100644
--- a/docusaurus/video/docusaurus/docs/api/_common_/manage-call-members.mdx
+++ b/docusaurus/video/docusaurus/docs/api/_common_/manage-call-members.mdx
@@ -35,16 +35,17 @@ call.update_call_members(
```bash
-curl -X PUT "https://video.stream-io-api.com/video/call/default/${CALL_ID}/members?api_key=${API_KEY}" \
- -H "Authorization: ${JWT_TOKEN}" \
- -H "Content-Type: application/json" \
- -H "stream-auth-type: jwt" \
- -d '{
- "update_members": [
- { "user_id": "sara" },
- { "user_id": "emily", "role": "admin" }
- ]
- }'
+# You can only add existing members to a call
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}/members?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "Content-Type: application/json" \
+ -H "stream-auth-type: jwt" \
+ -d '{
+ "update_members": [
+ { "user_id": "sara" },
+ { "user_id": "john", "role": "admin" }
+ ]
+ }'
```
@@ -68,5 +69,18 @@ call.updateCallMembers({
call.update_call_members(remove_members=["jack", "sara"])
```
+
+
+
+```bash
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}/members?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "Content-Type: application/json" \
+ -H "stream-auth-type: jwt" \
+ -d '{
+ "remove_members": ["sara"]
+ }'
+```
+
diff --git a/docusaurus/video/docusaurus/docs/api/_common_/rtmp.mdx b/docusaurus/video/docusaurus/docs/api/_common_/rtmp.mdx
index fc5849fd..aba0b793 100644
--- a/docusaurus/video/docusaurus/docs/api/_common_/rtmp.mdx
+++ b/docusaurus/video/docusaurus/docs/api/_common_/rtmp.mdx
@@ -45,5 +45,17 @@ rtmp_url = response.data.call.ingress.rtmp.address
print(rtmp_url, stream_key)
```
+
+
+
+```bash
+# RTMP URL is: response.call.rtmp.address
+curl -X GET "https://video.stream-io-api.com/api/v2/video/call/livestream/${CALL_ID}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt"
+
+# Stream key: create a user token
+```
+
diff --git a/docusaurus/video/docusaurus/docs/api/_common_/storage.mdx b/docusaurus/video/docusaurus/docs/api/_common_/storage.mdx
index 536b3198..bf98ab56 100644
--- a/docusaurus/video/docusaurus/docs/api/_common_/storage.mdx
+++ b/docusaurus/video/docusaurus/docs/api/_common_/storage.mdx
@@ -68,7 +68,7 @@ client.video.update_call_type(name='allhands', external_storage= "my-s3")
```bash
# 1. create a new storage with all the required parameters
curl -X POST https://video.stream-io-api.com/video/external_storage?api_key=${API_KEY} \
- -H "Authorization: ${JWT_TOKEN}" \
+ -H "Authorization: ${TOKEN}" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
@@ -84,8 +84,8 @@ curl -X POST https://video.stream-io-api.com/video/external_storage?api_key=${AP
}'
# 2. update the call type to use the new storage
-curl -X PUT https://video.stream-io-api.com/video/calltypes/${CALL_TYPE}?api_key=${API_KEY} \
- -H "Authorization: ${JWT_TOKEN}" \
+curl -X PUT https://video.stream-io-api.com/api/v2/video/calltypes/${CALL_TYPE}?api_key=${API_KEY} \
+ -H "Authorization: ${TOKEN}" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
@@ -142,8 +142,8 @@ call.start_recording(recording_external_storage="my-storage")
```bash
# update the call type to use Stream S3 storage for recordings
-curl -X PUT https://video.stream-io-api.com/video/calltypes/${CALL_TYPE}?api_key=${API_KEY} \
- -H "Authorization: ${JWT_TOKEN}" \
+curl -X PUT https://video.stream-io-api.com/api/v2/video/calltypes/${CALL_TYPE}?api_key=${API_KEY} \
+ -H "Authorization: ${TOKEN}" \
-H "stream-auth-type: jwt" \
-H 'Content-Type: application/json' \
-d '{
@@ -151,8 +151,8 @@ curl -X PUT https://video.stream-io-api.com/video/calltypes/${CALL_TYPE}?api_key
}'
# specify Stream S3 storage when starting call transcribing
-curl -X POST "https://video.stream-io-api.com/video/call/${CALL_TYPE}/${CALL_ID}/start_transcription?api_key=${API_KEY}" \
- -H "Authorization: ${JWT_TOKEN}" \
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}/start_transcription?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
-H "stream-auth-type: jwt" \
-H 'Content-Type: application/json' \
-d '{
@@ -252,7 +252,7 @@ client.create_external_storage(
```bash
curl -X POST https://video.stream-io-api.com/video/external_storage?api_key=${API_KEY} \
- -H "Authorization: ${JWT_TOKEN}" \
+ -H "Authorization: ${TOKEN}" \
-H "stream-auth-type: jwt" \
-H 'Content-Type: application/json' \
-d '{
@@ -334,7 +334,7 @@ client.create_external_storage(
```bash
curl -X POST https://video.stream-io-api.com/video/external_storage?api_key=${API_KEY} \
- -H "Authorization: ${JWT_TOKEN}" \
+ -H "Authorization: ${TOKEN}" \
-H "stream-auth-type: jwt" \
-H 'Content-Type: application/json' \
-d '{
diff --git a/docusaurus/video/docusaurus/docs/api/_common_/update-call.mdx b/docusaurus/video/docusaurus/docs/api/_common_/update-call.mdx
index 7b3504b6..7e3e017d 100644
--- a/docusaurus/video/docusaurus/docs/api/_common_/update-call.mdx
+++ b/docusaurus/video/docusaurus/docs/api/_common_/update-call.mdx
@@ -40,17 +40,18 @@ call.update(
```bash
-curl -X PUT "https://video.stream-io-api.com/video/call/default/${CALL_ID}?api_key=${API_KEY}" \
- -H "Authorization: ${JWT_TOKEN}" \
- -H "Content-Type: application/json" \
- -H "stream-auth-type: jwt" \
- -d '{
- "settings_override": {
- "audio": {
- "mic_default_on": true
- }
+curl -X PATCH "https://video.stream-io-api.com/api/v2/video/call/default/${CALL_ID}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "settings_override": {
+ "audio": {
+ "mic_default_on": true,
+ "default_device": "speaker"
}
- }'
+ }
+ }'
```
diff --git a/docusaurus/video/docusaurus/docs/api/basics/authentication.mdx b/docusaurus/video/docusaurus/docs/api/basics/authentication.mdx
index 3a819224..30eb3d79 100644
--- a/docusaurus/video/docusaurus/docs/api/basics/authentication.mdx
+++ b/docusaurus/video/docusaurus/docs/api/basics/authentication.mdx
@@ -53,6 +53,29 @@ client.upsert_users(
)
```
+
+
+
+```bash
+curl -X POST https://video.stream-io-api.com/api/v2/users?api_key=${API_KEY} \
+-H "Authorization: ${TOKEN}" \
+-H "stream-auth-type: jwt" \
+-H "Content-Type: application/json" \
+-d '{
+ "users": {
+ "john": {
+ "id": "john",
+ "role": "user",
+ "custom": {
+ "color": "red"
+ },
+ "name": "John",
+ "image": "link/to/profile/image"
+ }
+ }
+}'
+```
+
@@ -124,6 +147,47 @@ client.update_users_partial(
)
```
+
+
+
+```bash
+# Upserting a user, all existing user data will be overridden
+curl -X POST https://video.stream-io-api.com/api/v2/users?api_key=${API_KEY} \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "users": {
+ "john": {
+ "id": "john",
+ "role": "user",
+ "custom": {
+ "color": "red"
+ },
+ "name": "John",
+ "image": "link/to/profile/image"
+ }
+ }
+ }'
+
+# Partial update
+curl -X PATCH https://video.stream-io-api.com/api/v2/users?api_key=${API_KEY} \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "users": [
+ {
+ "id": "john",
+ "set": {
+ "color": "blue"
+ },
+ "unset": ["name"]
+ }
+ ]
+ }'
+```
+
@@ -153,7 +217,7 @@ Deleting a user means:
Delete has the following opitions:
| Name | Type | Description | Optional |
-|------------------------|----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
+| ---------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| `user` | Enum (soft, pruning, hard) | - Soft: marks user as deleted and retains all user data.
- Pruning: marks user as deleted and nullifies user information.
- Hard: deletes user completely - this requires hard option for messages and conversation as well. | Yes |
| `conversations` | Enum (soft, hard) | - Soft: marks all conversation channels as deleted (same effect as Delete Channels with 'hard' option disabled).
- Hard: deletes channel and all its data completely including messages (same effect as Delete Channels with 'hard' option enabled). | Yes |
| `messages` | Enum (soft, pruning, hard) | - Soft: marks all user messages as deleted without removing any related message data.
- Pruning: marks all user messages as deleted, nullifies message information and removes some message data such as reactions and flags.
- Hard: deletes messages completely with all related information. | Yes |
@@ -198,6 +262,47 @@ client.delete_users(user_ids=[""])
client.restore_users(user_ids=[""])
```
+
+
+
+```bash
+# Deactivate users
+curl -X POST https://video.stream-io-api.com/api/v2/users/deactivate?api_key=${API_KEY} \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "user_ids": ["sara"]
+ }'
+
+# Reactivate users
+curl -X POST https://video.stream-io-api.com/api/v2/users/deactivate?api_key=${API_KEY} \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "user_ids": ["sara"]
+ }'
+
+# Delete users
+curl -X POST https://video.stream-io-api.com/api/v2/users/delete?api_key=${API_KEY} \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "user_ids": ["sara"]
+ }'
+
+# Restore users
+curl -X POST https://video.stream-io-api.com/api/v2/users/restore?api_key=${API_KEY} \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "user_ids": ["sara"]
+ }'
+```
+
@@ -244,6 +349,22 @@ def create_user_token(request):
```
+
+
+
+
+```bash
+HEADER=$(echo -n '{"alg": "HS256", "typ": "JWT"}' | base64);
+USER_ID='';
+CURRENT_TIMESTAMP=$(date +%s);
+HOUR_FROM_NOW=$((CURRENT_TIMESTAMP + 3600))
+PAYLOAD=$(echo -n '{"user_id": "'${USER_ID}'", "iat": '${CURRENT_TIMESTAMP}', "exp": '${HOUR_FROM_NOW}'}' | base64);
+SECRET='';
+SIGNATURE=$(echo -n ${HEADER}.${PAYLOAD} | openssl dgst -sha256 -hmac ${SECRET} -binary | base64 | tr -d '=');
+
+echo "${HEADER}.${PAYLOAD}.${SIGNATURE}"
+```
+
@@ -280,5 +401,23 @@ call_cids = ["default:call1", "livestream:call2"]
client.create_call_token(user_id=user_id, expiration=exp, call_cids=call_cids)
```
+
+
+
+
+```bash
+HEADER=$(echo -n '{"alg": "HS256", "typ": "JWT"}' | base64);
+USER_ID='';
+CURRENT_TIMESTAMP=$(date +%s);
+HOUR_FROM_NOW=$((CURRENT_TIMESTAMP + 3600))
+CALL_CID1='livestream:1';
+CALL_CID2='livestream:2';
+PAYLOAD=$(echo -n '{"user_id": "'${USER_ID}'", "call_cids": ["'${CALL_CID1}'", "'${CALL_CID2}'"], "iat": '${CURRENT_TIMESTAMP}', "exp": '${HOUR_FROM_NOW}'}' | base64);
+SECRET='';
+SIGNATURE=$(echo -n ${HEADER}.${PAYLOAD} | openssl dgst -sha256 -hmac ${SECRET} -binary | base64 | tr -d '=');
+
+echo "${HEADER}.${PAYLOAD}.${SIGNATURE}"
+```
+
diff --git a/docusaurus/video/docusaurus/docs/api/basics/calls.mdx b/docusaurus/video/docusaurus/docs/api/basics/calls.mdx
index 6642ac4e..0bfee54b 100644
--- a/docusaurus/video/docusaurus/docs/api/basics/calls.mdx
+++ b/docusaurus/video/docusaurus/docs/api/basics/calls.mdx
@@ -40,6 +40,24 @@ await client.call('default', 'test-outgoing-call').getOrCreate({
});
```
+
+
+
+
+```bash
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "Content-Type: application/json" \
+ -H "stream-auth-type: jwt" \
+ -d '{
+ "ring": true,
+ "data": {
+ "created_by_id": "myself",
+ "members": [{ "user_id": "myself" }, { "user_id": "my friend" }]
+ }
+ }'
+```
+
@@ -66,6 +84,23 @@ await client.call('default', 'test-outgoing-call').getOrCreate({
});
```
+
+
+
+```bash
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "Content-Type: application/json" \
+ -H "stream-auth-type: jwt" \
+ -d '{
+ "notify": true,
+ "data": {
+ "created_by_id": "myself",
+ "members": [{ "user_id": "myself" }, { "user_id": "my friend" }]
+ }
+ }'
+```
+
@@ -115,6 +150,24 @@ await client.video.updateCallType(callTypeName, {
});
```
+
+
+
+
+```bash
+# Remove join call grant from user role, only include this for call_member role
+curl -X PUT "https://video.stream-io-api.com/api/v2/video/calltypes/${CALL_TYPE_NAME}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "Content-Type: application/json" \
+ -H "stream-auth-type: jwt" \
+ -d '{
+ "grants": {
+ "user": [...list all grants for user here],
+ "call_member": [...list all grants for call member here, "join-call"]
+ }
+ }'
+```
+
@@ -137,6 +190,16 @@ This action terminates the call for everyone. Ending a call requires the `end-ca
await call.endCall();
```
+
+
+
+
+```bash
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}/mark_ended?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt"
+```
+
@@ -200,6 +263,26 @@ client.query_calls(
```
+
+
+
+```bash
+curl -X POST "https://video.stream-io-api.com/api/v2/video/calls?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{ "sort": [{ "field": "starts_at", "direction": -1 }], "limit": 2 }'
+
+# Loading next page
+curl -X POST "https://video.stream-io-api.com/api/v2/video/calls?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{ "sort": [{ "field": "starts_at", "direction": -1 }], "limit": 2, "next": "" }'
+```
+
+
+
#### Query live calls
@@ -223,6 +306,18 @@ client.video.query_calls(
)
```
+
+
+
+
+```bash
+curl -X POST "https://video.stream-io-api.com/api/v2/video/calls?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{ "filter_conditions": { "backstage": { "$eq": false } } }'
+```
+
@@ -232,7 +327,7 @@ client.video.query_calls(
```js
-const mins30 = 1000 * 60 * 60 * 30;
+const mins30 = 1000 * 60 * 30;
const inNext30mins = new Date(Date.now() + mins30);
client.video.queryCalls({
filter_conditions: {
@@ -255,6 +350,19 @@ client.video.query_calls(
```
+
+
+
+
+```bash
+# Provide the time in ISO date string
+curl -X POST "https://video.stream-io-api.com/api/v2/video/calls?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{ "filter_conditions": { "starts_at": { "$gt": "2024-05-10T09:09:03.584Z" } } }'
+```
+
@@ -279,6 +387,20 @@ client.video.query_calls(
)
```
+
+
+
+
+```bash
+curl -X POST "https://video.stream-io-api.com/api/v2/video/calls?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "filter_conditions": { "ongoing": { "$eq": true } }
+ }'
+```
+
@@ -347,6 +469,57 @@ call.query_members(
)
```
+
+
+
+
+```bash
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/members?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "id": "'${CALL_ID}'",
+ "type": "'${CALL_TYPE}'"
+ }'
+
+# Sorting and pagination
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/members?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "id": "'${CALL_ID}'",
+ "type": "'${CALL_TYPE}'",
+ "sort": [{ "field": "user_id", "direction": 1 }],
+ "limit": 2
+ }'
+
+# Load next page
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/members?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "id": "'${CALL_ID}'",
+ "type": "'${CALL_TYPE}'",
+ "sort": [{ "field": "user_id", "direction": 1 }],
+ "limit": 2,
+ "next": ""
+ }'
+
+# Filtering
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/members?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "id": "'${CALL_ID}'",
+ "type": "'${CALL_TYPE}'",
+ "filter_conditions": { "role": { "$eq": "admin" } }
+ }'
+```
+
@@ -376,6 +549,26 @@ await call.sendCustomEvent({
});
```
+
+
+
+
+```bash
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}/event?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "event": {
+ "custom": {
+ "type": "draw",
+ "x": 10,
+ "y": 30
+ }
+ }
+ }'
+```
+
@@ -400,5 +593,30 @@ await call.unpinVideo({
});
```
+
+
+
+```bash
+# Pin video
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}/pin?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "session_id": "session-id",
+ "user_id": "user-id-to-unpin"
+ }'
+
+# Unpin video
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}/unpin?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "session_id": "session-id",
+ "user_id": "user-id-to-unpin"
+ }'
+```
+
diff --git a/docusaurus/video/docusaurus/docs/api/basics/get_started.mdx b/docusaurus/video/docusaurus/docs/api/basics/get_started.mdx
index 4d6cc705..0c40eba0 100644
--- a/docusaurus/video/docusaurus/docs/api/basics/get_started.mdx
+++ b/docusaurus/video/docusaurus/docs/api/basics/get_started.mdx
@@ -134,6 +134,30 @@ client.upsert_users(
client.create_token(user_id="tommaso-id", expiration=3600)
```
+
+
+
+
+```bash
+curl -X POST https://video.stream-io-api.com/api/v2/users?api_key=${API_KEY} \
+-H "Authorization: ${TOKEN}" \
+-H "stream-auth-type: jwt" \
+-H "Content-Type: application/json" \
+-d '{
+ "users": {
+ "john": {
+ "id": "john",
+ "role": "user",
+ "custom": {
+ "color": "red"
+ },
+ "name": "John",
+ "image": "link/to/profile/image"
+ }
+ }
+}'
+```
+
diff --git a/docusaurus/video/docusaurus/docs/api/basics/multi-tenant.mdx b/docusaurus/video/docusaurus/docs/api/basics/multi-tenant.mdx
index d8a89310..13e6c0e7 100644
--- a/docusaurus/video/docusaurus/docs/api/basics/multi-tenant.mdx
+++ b/docusaurus/video/docusaurus/docs/api/basics/multi-tenant.mdx
@@ -47,6 +47,25 @@ print(client.get_app().data.app.multi_tenant_enabled)
client.update_app(multi_tenant_enabled=True)
```
+
+
+
+```bash
+# Check status
+curl -X GET "https://video.stream-io-api.com/api/v2/app?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt"
+
+# Enable multi tenant
+curl -X PATCH "https://video.stream-io-api.com/api/v2/app?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ multi_tenant_enabled: true,
+ }'
+```
+
@@ -80,6 +99,25 @@ client.upsert_users(
)
```
+
+
+
+
+```bash
+curl -X POST https://video.stream-io-api.com/api/v2/users?api_key=${API_KEY} \
+-H "Authorization: ${TOKEN}" \
+-H "stream-auth-type: jwt" \
+-H "Content-Type: application/json" \
+-d '{
+ "users": {
+ "john": {
+ "id": "john",
+ "teams": ["red", "blue"]
+ }
+ }
+}'
+```
+
@@ -113,6 +151,24 @@ response = call.create(
```
+
+
+
+```bash
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "data": {
+ "created_by_id": "sacha@getstream.io",
+ "team": "blue"
+ }
+ }'
+```
+
+
+
Call teams allow you to ensure proper permission checking for a multi tenant application. Keep in mind that you will still need to enforce that call IDs are unique.
@@ -170,6 +226,29 @@ response = client.query_users(
```
+
+
+
+```bash
+# Search for users by name and team
+PAYLOAD='{"filter_conditions": {"name": "Nick", "teams": { "$in": ["red", "blue"] }}}';
+ENCODED_PAYLOAD=$(echo ${PAYLOAD} | perl -MURI::Escape -lne 'print uri_escape($_)')
+
+curl -X GET "https://video.stream-io-api.com/api/v2/users?api_key=${API_KEY}&payload=${ENCODED_PAYLOAD}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt"
+
+Search for users that are not part of any team
+PAYLOAD='{"filter_conditions": {"name": "Tom", "teams": null}}';
+ENCODED_PAYLOAD=$(echo ${PAYLOAD} | perl -MURI::Escape -lne 'print uri_escape($_)')
+
+curl -X GET "https://video.stream-io-api.com/api/v2/users?api_key=${API_KEY}&payload=${ENCODED_PAYLOAD}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt"
+```
+
+
+
## Query Calls
@@ -215,5 +294,30 @@ response = client.video.query_calls(
)
```
+
+
+
+
+```bash
+# All calls
+curl -X POST "https://video.stream-io-api.com/api/v2/video/calls?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt"
+
+# Calls without team
+curl -X POST "https://video.stream-io-api.com/api/v2/video/calls?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{"filter_conditions": {"team": null}}'
+
+# Calls with a specific team
+curl -X POST "https://video.stream-io-api.com/api/v2/video/calls?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{"filter_conditions": {"team": "blue"}}'
+```
+
diff --git a/docusaurus/video/docusaurus/docs/api/call_types/geofencing.mdx b/docusaurus/video/docusaurus/docs/api/call_types/geofencing.mdx
index 28d98afb..13abf514 100644
--- a/docusaurus/video/docusaurus/docs/api/call_types/geofencing.mdx
+++ b/docusaurus/video/docusaurus/docs/api/call_types/geofencing.mdx
@@ -75,5 +75,41 @@ call.create(
),
)
```
+
+
+
+
+
+```bash
+curl -X POST "https://video.stream-io-api.com/api/v2/video/calltypes?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "name": "",
+ "settings": {
+ "geofencing": {
+ "names": ["european_union"]
+ }
+ }
+}'
+
+# override on call level
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "Content-Type: application/json" \
+ -H "stream-auth-type: jwt" \
+ -d '{
+ "data": {
+ "created_by_id": "john",
+ "settings_override": {
+ "geofencing": {
+ "names": ["european_union", "united_states"]
+ }
+ }
+ }
+ }'
+```
+
diff --git a/docusaurus/video/docusaurus/docs/api/call_types/manage-types.mdx b/docusaurus/video/docusaurus/docs/api/call_types/manage-types.mdx
index ff8e54bc..74c4007f 100644
--- a/docusaurus/video/docusaurus/docs/api/call_types/manage-types.mdx
+++ b/docusaurus/video/docusaurus/docs/api/call_types/manage-types.mdx
@@ -17,7 +17,7 @@ import TabItem from '@theme/TabItem';
client.video.listCallTypes();
//or
-client.getCallType({name: 'livestream'});
+client.getCallType({ name: 'livestream' });
```
@@ -29,7 +29,24 @@ client.video.list_call_types()
# or
client.get_call_type(name= 'livestream')
```
+
+
+
+
+```bash
+curl -X GET "https://video.stream-io-api.com/api/v2/video/calltypes?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt"
+
+# or
+curl -X GET "https://video.stream-io-api.com/api/v2/video/calltypes/${CALL_TYPE_NAME}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt"
+```
+
+
+
## Create call type
@@ -74,6 +91,28 @@ client.video.create_call_type(
)
```
+
+
+
+
+
+```bash
+curl -X POST "https://video.stream-io-api.com/api/v2/video/calltypes?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "name": "allhands",
+ "settings": {
+ "audio": { "mic_default_on": true, "default_device": "speaker" }
+ },
+ "grants": {
+ "admin": ["send-audio", "send-video", "mute-users"],
+ "user": ["send-audio", "send-video"]
+ }
+ }'
+```
+
@@ -95,12 +134,29 @@ client.video.updateCallType('allhands', {
```py
-client.video.update_call_type(name='allhands',
+client.video.update_call_type(name='allhands',
settings= CallSettingsRequest(
audio=AudioSettingsRequest( mic_default_on= False, default_device= 'earpiece' ),
),
)
```
+
+
+
+
+
+```bash
+curl -X PUT "https://video.stream-io-api.com/api/v2/video/calltypes/${CALL_TYPE_NAME}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "settings": {
+ "audio": { "mic_default_on": false, "default_device": "earpiece" }
+ }
+ }'
+```
+
@@ -110,7 +166,7 @@ client.video.update_call_type(name='allhands',
```js
-client.video.deleteCallType({name: 'allhands'});
+client.video.deleteCallType({ name: 'allhands' });
```
@@ -120,5 +176,16 @@ client.video.deleteCallType({name: 'allhands'});
client.video.delete_call_type(name= 'allhands')
```
+
-
\ No newline at end of file
+
+
+
+```bash
+curl -X DELETE "https://video.stream-io-api.com/api/v2/video/calltypes/${CALL_TYPE_NAME}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt"
+```
+
+
+
diff --git a/docusaurus/video/docusaurus/docs/api/call_types/permissions.mdx b/docusaurus/video/docusaurus/docs/api/call_types/permissions.mdx
index d5c0aa41..62de8915 100644
--- a/docusaurus/video/docusaurus/docs/api/call_types/permissions.mdx
+++ b/docusaurus/video/docusaurus/docs/api/call_types/permissions.mdx
@@ -73,13 +73,45 @@ client.video.create_call_type(
},
)
-client.video.update_call_type(name = 'default',
+client.video.update_call_type(name = 'default',
grants= {
/* ... */
},
)
```
+
+
+
+
+
+```bash
+curl -X POST "https://video.stream-io-api.com/api/v2/video/calltypes?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "name": "",
+ "settings": {
+ "audio": { "mic_default_on": true, "default_device": "speaker" }
+ },
+ "grants": {
+ "admin": ["send-audio", "send-video", "mute-users"],
+ "customrole": ["send-audio", "send-video"]
+ }
+ }'
+
+# or edit a built-in call type
+curl -X PUT "https://video.stream-io-api.com/api/v2/video/calltypes/default?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "grants": {...}
+ }'
+```
+
+
### Built-in roles
diff --git a/docusaurus/video/docusaurus/docs/api/call_types/settings.mdx b/docusaurus/video/docusaurus/docs/api/call_types/settings.mdx
index 9b923205..c3e5819a 100644
--- a/docusaurus/video/docusaurus/docs/api/call_types/settings.mdx
+++ b/docusaurus/video/docusaurus/docs/api/call_types/settings.mdx
@@ -77,6 +77,43 @@ call.create(
),
)
```
+
+
+
+
+
+```bash
+curl -X POST "https://video.stream-io-api.com/api/v2/video/calltypes?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "name": "",
+ "settings": {
+ "screensharing": {
+ "access_request_enabled": false,
+ "enabled": true
+ }
+ }
+ }'
+
+# override settings on call
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "Content-Type: application/json" \
+ -H "stream-auth-type: jwt" \
+ -d '{
+ "data": {
+ "created_by_id": "john",
+ "settings_override": {
+ "screensharing": {
+ "enabled": false
+ }
+ }
+ }
+ }'
+```
+
@@ -124,6 +161,33 @@ client.video.create_call_type(
),
)
```
+
+
+
+
+
+```bash
+curl -X POST "https://video.stream-io-api.com/api/v2/video/calltypes?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "name": "",
+ "notification_settings": {
+ "enabled": true,
+ "call_notification": {
+ "apns": {
+ "title": "{{ user.display_name }} invites you to a call"
+ },
+ "enabled": true
+ },
+ "session_started": {
+ "enabled": false
+ }
+ }
+ }'
+```
+
diff --git a/docusaurus/video/docusaurus/docs/api/moderation/overview.mdx b/docusaurus/video/docusaurus/docs/api/moderation/overview.mdx
index 3d599ff7..099c9716 100644
--- a/docusaurus/video/docusaurus/docs/api/moderation/overview.mdx
+++ b/docusaurus/video/docusaurus/docs/api/moderation/overview.mdx
@@ -44,6 +44,29 @@ call.block_user(user_id='sara')
call.unblock_user(user_id='sara')
```
+
+
+
+```bash
+# Block user
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}/unblock?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "user_id": "sara"
+ }'
+
+# Unblock user
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}/unblock?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "user_id": "sara"
+ }'
+```
+
@@ -77,6 +100,27 @@ call.update(
)
```
+
+
+
+```bash
+curl -X PATCH "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "Content-Type: application/json" \
+ -H "stream-auth-type: jwt" \
+ -d '{
+ "data": {
+ "created_by_id": "john",
+ "settings_override": {
+ "screensharing": {
+ "enabled": true,
+ "access_request_enabled": true
+ }
+ }
+ }
+ }'
+```
+
@@ -106,6 +150,21 @@ call.mute_users(
)
```
+
+
+
+```bash
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}/mute_users?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "Content-Type: application/json" \
+ -H "stream-auth-type: jwt" \
+ -d '{
+ "mute_all_users": true,
+ "audio": true,
+ "muted_by_id": "john"
+ }'
+```
+
@@ -138,6 +197,24 @@ call.mute_users(
)
```
+
+
+
+```bash
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}/mute_users?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "Content-Type: application/json" \
+ -H "stream-auth-type: jwt" \
+ -d '{
+ "user_ids": ["sara"],
+ "audio": true,
+ "video": true,
+ "screenshare": true,
+ "screenshare_audio": true,
+ "muted_by_id": "john"
+ }'
+```
+
@@ -175,6 +252,17 @@ call.update_user_permissions(
)
```
+
+
+
+```bash
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}/user_permissions?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "Content-Type: application/json" \
+ -H "stream-auth-type: jwt" \
+ -d '{ "user_id": "sara", "grant_permissions": ["send-audio"] }'
+```
+
@@ -208,6 +296,17 @@ call.update_user_permissions(
)
```
+
+
+
+```bash
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}/user_permissions?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "Content-Type: application/json" \
+ -H "stream-auth-type: jwt" \
+ -d '{ "user_id": "sara", "revoke_permissions": ["send-audio"] }'
+```
+
@@ -252,6 +351,54 @@ client.ban(
)
```
+
+
+
+
+```bash
+# Ban a user
+curl -X POST https://video.stream-io-api.com/api/v2/moderation/ban?api_key=${API_KEY} \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "target_user_id": "sara",
+ "banned_by_id": "john",
+ "reason": "banned reason here"
+ }'
+
+# Removes ban for user
+curl -X DELETE https://video.stream-io-api.com/api/v2/moderation/ban?api_key=${API_KEY} \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "target_user_id": "sara"
+ }'
+
+# Ban a user for 30 minutes
+curl -X POST https://video.stream-io-api.com/api/v2/moderation/ban?api_key=${API_KEY} \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "target_user_id": "sara",
+ "banned_by_id": "john",
+ "timeout": 30
+ }'
+
+# Ban a user and all users sharing the same IP
+curl -X POST https://video.stream-io-api.com/api/v2/moderation/ban?api_key=${API_KEY} \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "target_user_id": "sara",
+ "banned_by_id": "john",
+ "ip_ban": true
+ }'
+```
+
@@ -288,5 +435,29 @@ if task_status.data.status == "completed":
print(task_status.data.result)
```
+
+
+
+
+```bash
+# Deactivate users
+curl -X POST https://video.stream-io-api.com/api/v2/users/deactivate?api_key=${API_KEY} \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "user_ids": ["sara"]
+ }'
+
+# Reactivate users
+curl -X POST https://video.stream-io-api.com/api/v2/users/deactivate?api_key=${API_KEY} \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "user_ids": ["sara"]
+ }'
+```
+
diff --git a/docusaurus/video/docusaurus/docs/api/recording/recording_calls.mdx b/docusaurus/video/docusaurus/docs/api/recording/recording_calls.mdx
index cd021342..40096524 100644
--- a/docusaurus/video/docusaurus/docs/api/recording/recording_calls.mdx
+++ b/docusaurus/video/docusaurus/docs/api/recording/recording_calls.mdx
@@ -5,7 +5,6 @@ slug: /recording/calls
title: Recording calls
---
-
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
@@ -44,14 +43,12 @@ call.stop_recording()
```bash
-curl -X POST "https://video.stream-io-api.com/video/call/${CALL_TYPE}/${CALL_ID}/start_recording?api_key=${API_KEY}" \
- -H "Authorization: ${JWT_TOKEN}" \
- -H "Content-Type: application/json" \
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}/start_recording?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
-H "stream-auth-type: jwt"
-curl -X POST "https://video.stream-io-api.com/video/call/${CALL_TYPE}/${CALL_ID}/stop_recording?api_key=${API_KEY}" \
- -H "Authorization: ${JWT_TOKEN}" \
- -H "Content-Type: application/json" \
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}/stop_recording?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
-H "stream-auth-type: jwt"
```
@@ -80,8 +77,8 @@ call.list_recordings()
```bash
-curl "https://video.stream-io-api.com/video/call/${CALL_TYPE}/${CALL_ID}/recordings?api_key=${API_KEY}" \
- -H "Authorization: ${JWT_TOKEN}" \
+curl "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}/recordings?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
-H "stream-auth-type: jwt"
```
@@ -116,7 +113,7 @@ call.delete_recording(sessionID, filename)
```bash
curl -X DELETE "https://video.stream-io-api.com/video/call/${CALL_TYPE}/${CALL_ID}/${SESSION_ID}/${FILENAME}?api_key=${API_KEY}" \
- -H "Authorization: ${JWT_TOKEN}" \
+ -H "Authorization: ${TOKEN}" \
-H "stream-auth-type: jwt"
```
@@ -180,6 +177,7 @@ call.update({
call.update({
settings_override: {
recording: {
+ mode: VideoRecordSettingsRequestModeEnum.AVAILABLE,
audio_only: false,
quality: VideoRecordSettingsRequestQualityEnum._1080P,
},
@@ -243,6 +241,66 @@ call.update(
)
```
+
+
+
+
+```bash
+# Disable on call level
+curl -X PATCH "https://video.stream-io-api.com/api/v2/video/call/default/${CALL_ID}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "settings_override": {
+ "recording": {
+ "mode": "disabled"
+ }
+ }
+ }'
+
+# Enable on call level
+curl -X PATCH "https://video.stream-io-api.com/api/v2/video/call/default/${CALL_ID}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "settings_override": {
+ "recording": {
+ "mode": "available"
+ }
+ }
+ }'
+
+# Other settings
+curl -X PATCH "https://video.stream-io-api.com/api/v2/video/call/default/${CALL_ID}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "settings_override": {
+ "recording": {
+ "mode": "available",
+ "audio_only": false,
+ "quality": "1080p"
+ }
+ }
+}'
+
+# Enable/disable on call type level
+curl -X PUT "https://video.stream-io-api.com/api/v2/video/calltypes/${CALL_TYPE_NAME}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "settings": {
+ "recording": {
+ "mode": "disabled"
+ }
+ }
+ }'
+```
+
@@ -281,6 +339,26 @@ call.update(
```
+
+
+
+```bash
+curl -X PATCH "https://video.stream-io-api.com/api/v2/video/call/default/${CALL_ID}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "settings_override": {
+ "recording": {
+ "mode": "available",
+ "audio_only": true
+ }
+ }
+}'
+```
+
+
+
## Recording layouts
@@ -342,7 +420,7 @@ Each layout has a number of options that you can configure. Here is an example:
```js
const layoutOptions = {
'logo.image_url':
- 'https://theme.zdassets.com/theme_assets/9442057/efc3820e436f9150bc8cf34267fff4df052a1f9c.png',
+ 'https://theme.zdassets.com/theme_assets/9442057/efc3820e436f9150bc8cf34267fff4df052a1f9c.png',
'logo.horizontal_position': 'center',
'title.text': 'Building Stream Video Q&A',
'title.horizontal_position': 'center',
@@ -408,6 +486,43 @@ client.video.update_call_type(
)
```
+
+
+
+
+```bash
+curl -X PUT "https://video.stream-io-api.com/api/v2/video/calltypes/${CALL_TYPE_NAME}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "settings": {
+ "recording": {
+ "mode": "available",
+ "audio_only": false,
+ "quality": "1080p",
+ "layout": {
+ "name": "spotlight",
+ "options": {
+ "logo.image_url": "https://theme.zdassets.com/theme_assets/9442057/efc3820e436f9150bc8cf34267fff4df052a1f9c.png",
+ "logo.horizontal_position": "center",
+ "title.text": "Building Stream Video Q&A",
+ "title.horizontal_position": "center",
+ "title.color": "black",
+ "participant_label.border_radius": "0px",
+ "participant.border_radius": "0px",
+ "layout.spotlight.participants_bar_position": "top",
+ "layout.background_color": "#f2f2f2",
+ "participant.placeholder_background_color": "#1f1f1f",
+ "layout.single-participant.padding_inline": "20%",
+ "participant_label.background_color": "transparent"
+ }
+ }
+ }
+ }
+ }'
+```
+
@@ -550,6 +665,30 @@ client.video.update_call_type(
)
```
+
+
+
+
+```bash
+curl -X PUT "https://video.stream-io-api.com/api/v2/video/calltypes/${CALL_TYPE_NAME}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "settings": {
+ "recording": {
+ "mode": "available",
+ "audio_only": false,
+ "quality": "1080p",
+ "layout": {
+ "name": "spotlight",
+ "external_css_url": "https://path/to/custom.css"
+ }
+ }
+ }
+ }'
+```
+
@@ -600,6 +739,29 @@ client.video.update_call_type(
)
```
+
+
+
+```bash
+curl -X PUT "https://video.stream-io-api.com/api/v2/video/calltypes/${CALL_TYPE_NAME}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "settings": {
+ "recording": {
+ "mode": "available",
+ "audio_only": false,
+ "quality": "1080p",
+ "layout": {
+ "name": "custom",
+ "external_app_url": "https://path/to/layout/app"
+ }
+ }
+ }
+ }'
+```
+
diff --git a/docusaurus/video/docusaurus/docs/api/streaming/backstage.mdx b/docusaurus/video/docusaurus/docs/api/streaming/backstage.mdx
index a152224b..f1774bd3 100644
--- a/docusaurus/video/docusaurus/docs/api/streaming/backstage.mdx
+++ b/docusaurus/video/docusaurus/docs/api/streaming/backstage.mdx
@@ -65,6 +65,37 @@ client.video.update_call_type(
)
```
+
+
+
+```bash
+# call level update
+curl -X PATCH "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE_NAME}/${CALL_ID}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "settings_override": {
+ "backstage": {
+ "enabled": true
+ }
+ }
+ }'
+
+# call type level update
+curl -X PUT "https://video.stream-io-api.com/api/v2/video/calltypes/${CALL_TYPE_NAME}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "settings": {
+ "backstage": {
+ "enabled": true
+ }
+ }
+ }'
+```
+
@@ -95,6 +126,21 @@ client.video.update_call_type(
)
```
+
+
+
+```bash
+curl -X PUT "https://video.stream-io-api.com/api/v2/video/calltypes/${CALL_TYPE_NAME}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "grants": {
+ "host": ["join-backstage"]
+ }
+ }'
+```
+
@@ -130,5 +176,14 @@ call.stopLive();
call.stop_live()
```
+
+
+
+```bash
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE_NAME}/${CALL_ID}/stop_live?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt"
+```
+
diff --git a/docusaurus/video/docusaurus/docs/api/streaming/hls.mdx b/docusaurus/video/docusaurus/docs/api/streaming/hls.mdx
index 9ebcfe1c..422f87e8 100644
--- a/docusaurus/video/docusaurus/docs/api/streaming/hls.mdx
+++ b/docusaurus/video/docusaurus/docs/api/streaming/hls.mdx
@@ -50,6 +50,17 @@ const isBroadcasting = resp.call.egress.broadcasting;
response = call.get()
print(f"broadcasting: {response.data.call.egress.broadcasting}")
```
+
+
+
+
+```bash
+# Broadcasting state: resp.call.egress.broadcasting
+curl -X GET "https://video.stream-io-api.com/api/v2/video/call/livestream/${CALL_ID}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt"
+```
+
@@ -82,5 +93,17 @@ response = call.get()
# the URL of the HLS stream
response.data.call.egress.hls.playlist_url
```
+
+
+
+
+
+```bash
+# Broadcasting URL: resp.call.egress.hls.playlist_url
+curl -X GET "https://video.stream-io-api.com/api/v2/video/call/livestream/${CALL_ID}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt"
+```
+
diff --git a/docusaurus/video/docusaurus/docs/api/streaming/overview.mdx b/docusaurus/video/docusaurus/docs/api/streaming/overview.mdx
index 95abd1c6..a0882d71 100644
--- a/docusaurus/video/docusaurus/docs/api/streaming/overview.mdx
+++ b/docusaurus/video/docusaurus/docs/api/streaming/overview.mdx
@@ -64,6 +64,25 @@ response = call.create(
)
```
+
+
+
+
+```bash
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/livestream/${CALL_ID}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "Content-Type: application/json" \
+ -H "stream-auth-type: jwt" \
+ -d '{
+ "data": {
+ "created_by_id": "john",
+ "members": [
+ { "role": "host", "user_id": "john" }
+ ]
+ }
+ }'
+```
+
diff --git a/docusaurus/video/docusaurus/docs/api/transcription/transcribing_calls.mdx b/docusaurus/video/docusaurus/docs/api/transcription/transcribing_calls.mdx
index 11139a8e..d3af95af 100644
--- a/docusaurus/video/docusaurus/docs/api/transcription/transcribing_calls.mdx
+++ b/docusaurus/video/docusaurus/docs/api/transcription/transcribing_calls.mdx
@@ -8,13 +8,13 @@ title: Call Transcriptions
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
-You can transcribe calls to text using API calls or configure your call types to be automatically transcribed. When transcription is enabled automatically, the transcription process will start when the first user joins the call, and then stop when all participant have left the call.
+You can transcribe calls to text using API calls or configure your call types to be automatically transcribed. When transcription is enabled automatically, the transcription process will start when the first user joins the call, and then stop when all participant have left the call.
Transcriptions are structured as plain-text JSONL files and automatically uploaded to Stream managed storage or to your own configurable storage. Websocket and webhook events are also sent when transcription starts, stops and completes.
Stream supports transcribing calls in multiple languages as well as transcriptions for closed captions. You can find more information about both later in this document.
-> **Note:**: we transcribe 1 dominant speaker and 2 other participants at a time
+> **Note** we transcribe 1 dominant speaker and 2 other participants at a time
## Quick Start
@@ -44,14 +44,12 @@ call.stop_transcription()
```bash
-curl -X POST "https://video.stream-io-api.com/video/call/default/${CALL_ID}/start_transcription?api_key=${API_KEY}"\
- -H "Authorization: ${JWT_TOKEN}" \
- -H "Content-Type: application/json" \
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/default/${CALL_ID}/start_transcription?api_key=${API_KEY}"\
+ -H "Authorization: ${TOKEN}" \
-H "stream-auth-type: jwt"
-curl -X POST "https://video.stream-io-api.com/video/call/default/${CALL_ID}/stop_transcription?api_key=${API_KEY}"\
- -H "Authorization: ${JWT_TOKEN}" \
- -H "Content-Type: application/json" \
+curl -X POST "https://video.stream-io-api.com/api/v2/video/call/default/${CALL_ID}/stop_transcription?api_key=${API_KEY}"\
+ -H "Authorization: ${TOKEN}" \
-H "stream-auth-type: jwt"
```
@@ -82,8 +80,8 @@ call.list_transcriptions()
```bash
-curl "https://video.stream-io-api.com/video/call/default/${CALL_ID}/transcriptions?api_key=${API_KEY}" \
- -H "Authorization: ${JWT_TOKEN}" \
+curl "https://video.stream-io-api.com/api/v2/video/call/default/${CALL_ID}/transcriptions?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
-H "stream-auth-type: jwt"
```
@@ -100,32 +98,33 @@ These events are sent to users connected to the call and your webhook/SQS:
- `call.transcription_failed` sent if the transcription process encounters any issues.
## `transcription.ready` event example
+
```json
{
- "type": "call.transcription_ready",
- "created_at": "2024-03-18T08:24:14.769328551Z",
- "call_cid": "default:mkzN17EUrgvn",
- "call_transcription": {
- "filename": "transcript_default_mkzN17EUrgvn_1710750207642.jsonl",
- "url": "https://frankfurt.stream-io-cdn.com/1129528/video/transcriptions/default_mkzN17EUrgvn/transcript_default_mkzN17EUrgvn_1710750207642.jsonl?Expires=1710751154&Signature=OhdoTClQm5MT8ITPLAEJcKNflsJ7B2G3j7kx~kQyPrAETftrM2rzZy4IIT1XIC~8MrbPduWcj1tILXoSg3ldfZEHWRPqeMFr0caljPAVAL~mybUb4Kct2JoPjfsYfmj4FzSQbT7Iib38qPr7uiP0axTFm0VKRenkNwwCoS0F858u9Mdr8r6fTzILhiOZ1hOjw3V-TT1YbR20Yn4abKi6i50GAs5fqUDtSlo9DmEJgcS79Y0wUD1g18cGZvg3NiH3ogHQnmvoNrf28Cxc0JhBCe4wFErCMJ3pinewEOwDEEOMdHcRtcfWy72w6MTEwi0yomHYIU5flaYgUXCkkOJODw__&Key-Pair-Id=APKAIHG36VEWPDULE23Q",
- "start_time": "2024-03-18T08:23:27.642688204Z",
- "end_time": "2024-03-18T08:24:14.754731786Z"
- },
- "received_at": "2024-03-18T08:24:14.790Z"
+ "type": "call.transcription_ready",
+ "created_at": "2024-03-18T08:24:14.769328551Z",
+ "call_cid": "default:mkzN17EUrgvn",
+ "call_transcription": {
+ "filename": "transcript_default_mkzN17EUrgvn_1710750207642.jsonl",
+ "url": "https://frankfurt.stream-io-cdn.com/1129528/video/transcriptions/default_mkzN17EUrgvn/transcript_default_mkzN17EUrgvn_1710750207642.jsonl?Expires=1710751154&Signature=OhdoTClQm5MT8ITPLAEJcKNflsJ7B2G3j7kx~kQyPrAETftrM2rzZy4IIT1XIC~8MrbPduWcj1tILXoSg3ldfZEHWRPqeMFr0caljPAVAL~mybUb4Kct2JoPjfsYfmj4FzSQbT7Iib38qPr7uiP0axTFm0VKRenkNwwCoS0F858u9Mdr8r6fTzILhiOZ1hOjw3V-TT1YbR20Yn4abKi6i50GAs5fqUDtSlo9DmEJgcS79Y0wUD1g18cGZvg3NiH3ogHQnmvoNrf28Cxc0JhBCe4wFErCMJ3pinewEOwDEEOMdHcRtcfWy72w6MTEwi0yomHYIU5flaYgUXCkkOJODw__&Key-Pair-Id=APKAIHG36VEWPDULE23Q",
+ "start_time": "2024-03-18T08:23:27.642688204Z",
+ "end_time": "2024-03-18T08:24:14.754731786Z"
+ },
+ "received_at": "2024-03-18T08:24:14.790Z"
}
-
```
+
## Transcription JSONL file format
- ```json
- {"type":"speech", "start_time": "2024-02-28T08:18:18.061031795Z", "stop_time":"2024-02-28T08:18:22.401031795Z", "speaker_id": "Sacha_Arbonel", "text": "hello"}
- {"type":"speech", "start_time": "2024-02-28T08:18:22.401031795Z", "stop_time":"2024-02-28T08:18:26.741031795Z", "speaker_id": "Sacha_Arbonel", "text": "how are you"}
- {"type":"speech", "start_time": "2024-02-28T08:18:26.741031795Z", "stop_time":"2024-02-28T08:18:31.081031795Z", "speaker_id": "Tommaso_Barbugli", "text": "I'm good"}
- {"type":"speech", "start_time": "2024-02-28T08:18:31.081031795Z", "stop_time":"2024-02-28T08:18:35.421031795Z", "speaker_id": "Tommaso_Barbugli", "text": "how about you"}
- {"type":"speech", "start_time": "2024-02-28T08:18:35.421031795Z", "stop_time":"2024-02-28T08:18:39.761031795Z", "speaker_id": "Sacha_Arbonel", "text": "I'm good too"}
- {"type":"speech", "start_time": "2024-02-28T08:18:39.761031795Z", "stop_time":"2024-02-28T08:18:44.101031795Z", "speaker_id": "Tommaso_Barbugli", "text": "that's great"}
- {"type":"speech", "start_time": "2024-02-28T08:18:44.101031795Z", "stop_time":"2024-02-28T08:18:48.441031795Z", "speaker_id": "Tommaso_Barbugli", "text": "I'm glad to hear that"}
- ```
+```json
+{"type":"speech", "start_time": "2024-02-28T08:18:18.061031795Z", "stop_time":"2024-02-28T08:18:22.401031795Z", "speaker_id": "Sacha_Arbonel", "text": "hello"}
+{"type":"speech", "start_time": "2024-02-28T08:18:22.401031795Z", "stop_time":"2024-02-28T08:18:26.741031795Z", "speaker_id": "Sacha_Arbonel", "text": "how are you"}
+{"type":"speech", "start_time": "2024-02-28T08:18:26.741031795Z", "stop_time":"2024-02-28T08:18:31.081031795Z", "speaker_id": "Tommaso_Barbugli", "text": "I'm good"}
+{"type":"speech", "start_time": "2024-02-28T08:18:31.081031795Z", "stop_time":"2024-02-28T08:18:35.421031795Z", "speaker_id": "Tommaso_Barbugli", "text": "how about you"}
+{"type":"speech", "start_time": "2024-02-28T08:18:35.421031795Z", "stop_time":"2024-02-28T08:18:39.761031795Z", "speaker_id": "Sacha_Arbonel", "text": "I'm good too"}
+{"type":"speech", "start_time": "2024-02-28T08:18:39.761031795Z", "stop_time":"2024-02-28T08:18:44.101031795Z", "speaker_id": "Tommaso_Barbugli", "text": "that's great"}
+{"type":"speech", "start_time": "2024-02-28T08:18:44.101031795Z", "stop_time":"2024-02-28T08:18:48.441031795Z", "speaker_id": "Tommaso_Barbugli", "text": "I'm glad to hear that"}
+```
## User Permissions
@@ -224,14 +223,74 @@ client.update(
```
-
+
+```bash
+# Disable on call level
+curl -X PATCH "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE_NAME}/${CALL_ID}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "settings_override": {
+ "transcription": {
+ "mode": "disabled"
+ }
+ }
+ }'
+
+# Disable on call type level
+curl -X PUT "https://video.stream-io-api.com/api/v2/video/calltypes/${CALL_TYPE_NAME}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "settings": {
+ "transcription": {
+ "mode": "disabled"
+ }
+ }
+ }'
+
+# Enable on call level
+curl -X PATCH "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE_NAME}/${CALL_ID}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "settings_override": {
+ "transcription": {
+ "mode": "available"
+ }
+ }
+ }'
+
+# Other settings
+curl -X PATCH "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE_NAME}/${CALL_ID}?api_key=${API_KEY}" \
+ -H "Authorization: ${TOKEN}" \
+ -H "stream-auth-type: jwt" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "settings_override": {
+ "transcription": {
+ "mode": "available",
+ "audio_only": false,
+ "quality": "auto_on"
+ }
+ }
+ }'
+```
+
+By default the transcriptions are stored on Stream’s S3 bucket and retained for 2-weeks. You can also configure your application to have transcriptions stored on your own external storage, see the storage section of tis document for more detail.
+
+
+
## Multi language support
When using out of the box, transcriptions are optimized for calls with english speakers. You can configure call transcription to optimize for a different language than english. You can also specify as secondary language as well if you expect to have two languages used simultaneously in the same call.
-Please note: the call transcription feature does not perform any language translation. When you select a different language, the trascription process will simply improve the speech-to-text detection for that language.
+Please note: the call transcription feature does not perform any language translation. When you select a different language, the trascription process will simply improve the speech-to-text detection for that language.
You can set the transcription languages in two ways: either as a call setting or you can provide them to the `StartTranscription` API call. Languages are specified using their international language code (ISO639)
Please note: we currently don’t support changing language settings during the call.
@@ -269,4 +328,4 @@ Please note: we currently don’t support changing language settings during the
- Korean (ko)
- Malay (ms)
- Norwegian (no)
-- Ukrainian (uk)
\ No newline at end of file
+- Ukrainian (uk)