From 290212f9889084325dd785a8f3cf6e8f3ed47132 Mon Sep 17 00:00:00 2001 From: Stream Bot Date: Wed, 16 Oct 2024 13:52:39 +0200 Subject: [PATCH] Added more details for anon users --- .../docs/Android/03-guides/01-client-auth.mdx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docusaurus/docs/Android/03-guides/01-client-auth.mdx b/docusaurus/docs/Android/03-guides/01-client-auth.mdx index 833a3ac6ff..2b8c92d5a0 100644 --- a/docusaurus/docs/Android/03-guides/01-client-auth.mdx +++ b/docusaurus/docs/Android/03-guides/01-client-auth.mdx @@ -57,6 +57,25 @@ val streamVideo = StreamVideoBuilder( ).build() ``` +Anonymous users don't establish an active web socket connection, therefore they won't receive any events. They are just able to watch a livestream or join a call. + +The token for an anonymous user should contain the `call_cids` field, which is an array of the call `cid`'s that the user is allowed to join. + +Here's an example JWT token payload for an anonymous user: + +```kotlin +{ + "iss": "@stream-io/dashboard", + "iat": 1726406693, + "exp": 1726493093, + "user_id": "!anon", + "role": "viewer", + "call_cids": [ + "livestream:123" + ] +} +``` + ### Client options Here's a more complete example of the client options: