User Roles

LAST EDIT Sep 16 2021

User Roles

Copied!

User Roles are how permissions are grouped together and assigned to a user. Each user role can have separate permissions for different channel types. For example, a moderator for a livestream channel could have different permissions from a moderator for a messaging channel.

Stream maintains a user role for each user_id at an Application level and a Channel level. This is to allow flexibility and to cover a wider range of use cases.

Application User Roles

Copied!

This is the role assigned to users which applies across the entire application, and gives permissions for things which are outside of a channel's context, for example, being able to create channels, or search for users.

Role

Description

Permissions

Anonymous

Does not require a JWT and does not require a user_id registered with Stream

Lowest

Guest

Does not require a JWT but does require a user_id registered with Stream. Guests can read channels but not post messages

Low

User

A registered user on the app with a JWT provided by a trusted source (server)

Normal

Admin

A registered user with elevated permissions granted from a trusted source (server)

High

Server-side

Not technically a user role. This is the client instantiated with the app key and secret. This is the highest level of administration and is run on the server

Highest

Channel User Roles

Copied!

This is the role assigned to a user once they are added to a channel. This role is unique to that channel and a user could have a different role in each channel which they are a member

Roles

Description

Permissions

channel_member

A typical member of a channel and the default user role for an Application User

Normal

channel_moderator

Elevated permissions on a channel. Granted to channel members through this method

High

Owner is not an official role, but whoever is the creator of a channel, or a message, gets additional permissions for objects they created versus objects created by someone else, this is managed on the permissions level.

Change a User Role

Copied!

Add Moderators to a Channel

Copied!

Remove Moderators From a Channel

Copied!

Custom Roles

Copied!

As part of Stream's permissions v2 (in beta), you can also create custom roles if the built-in roles are not enough to cover all your use case. This is not generally available yet, please contact support if you require custom roles