Skip to content

Commit

Permalink
add user blocking docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tbarbugli committed Jun 8, 2024
1 parent 00c97db commit 8277f0e
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion docusaurus/video/docusaurus/docs/api/moderation/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -435,4 +435,39 @@ curl -X POST https://video.stream-io-api.com/api/v2/moderation/ban?api_key=${API

Deactivated users are no longer able to make any API call or connect to websockets (and receive updates on event of any kind).

<DeactivateReactivate/>
<DeactivateReactivate/>

### User blocking

Users can block other users using the API, when a user blocks another it will no longer receive ringing calls or notification from the blocked user.


<Tabs groupId="examples">
<TabItem value="js" label="JavaScript">

```js
```

</TabItem>
<TabItem value="py" label="Python">

```py
# alice blocks bob
client.block_users(blocked_user_id=bob.id, user_id=alice.id)

# list blocked users by alice
response = client.get_blocked_users(user_id=alice.id)

# alice unblocks bob
client.unblock_users(blocked_user_id=bob.id, user_id=alice.id)
```

</TabItem>

<TabItem value="curl" label="cURL">

```bash
```

</TabItem>
</Tabs>

0 comments on commit 8277f0e

Please sign in to comment.