Private ServicesEvent member token

Create Event Member Token (private)

Use: Viewer


Issue Event Member Tokens to grant users specific permissions within an event.

In production, call this from your backend using your company’s API key. For development and testing, you can run it in your frontend to verify your integration without backend setup.


Example

file.ts
export const createEventMemberToken = async () => {
 
    const opts = {
        method: 'POST',
        headers: {
            'content-type': 'application/json',
            'Authorization': `Bearer ${'your-api-key'}`
        },
        body: JSON.stringify({
            arguments: [
                {
                    user_id: '8ae5a0b9-9206-44ca-950b-5a0b51f82d4e',
                    event_id: 'c2ed3890-716d-4380-a597-d860ecacada0',
                    metadata: {
                        note: 'temporary moderator'
                    },
                    permissions: [
                        "PermissionChatMute",
                        "PermissionChatUnmute"
                    ]
                }
            ]
        })
    };
 
    const res = await fetch('https://event.dev.zu.casa/event.tokens.private.v1.Service/Create', opts).then(r => r.json());
 
    return res.tokens[0];
};

Sample Response

file.json
{
  "tokens": [
    "52jAQLH01rJTSUaAdFFvnHY6sqBTyMn1PYrlk4Mtz4-VskjLxmQcXGgarceWIaVjLzzrnza_MUkHpFoLur4eqiEUcUUSMdMlSAxgHb7aiBAq-kp89pyFO-nNE2oDaPAJ6AVLcdVL_YRgjjY73Tfh5mv91zaDc0SIAB6XciLuBVVO_itpj43d9aEZ3FfW1kBlFer46iWpazgFo1MOhZMj7EI0oBciAjUxpDWzdPd2FSwLsKXa31c4LE6-hhmIDZE5xiqcfmZp2a3tv3QVa_Pfp75pZ8lWDAEfRpq3uzGHvjcj_jzWzvKpxV4cOlzTK5CR7ojcp0C8WydAvVD-H6zTDK4R-CkYW7fn-D046PDmSvNq5xEPccUk"
  ]
}

Permission

Below are all available permissions and what they do. Names match the API exactly.

Chat permissions (100–199)

PermissionImplied ByDescription
PermissionChatGrants all chat capabilities below.
PermissionChatBlockPermissionChatBlock a member from using chat.
PermissionChatUnblockPermissionChatRemove a chat block for a member.
PermissionChatMutePermissionChatMute a member (they cannot send messages).
PermissionChatUnmutePermissionChatUnmute a member.
PermissionChatMessageDeletePermissionChatDelete messages in chat.
PermissionChatKickPermissionChatKick a member out of the chat.
permissionChatSlowmodeBypassPermissionChatBypass slowmode restrictions when sending messages.

Event permissions (300–399)

PermissionImplied ByDescription
PermissionEventGrants general event management capabilities below.
PermissionEventBlockPermissionEventBlock a member from the event (deny access).
PermissionEventUnblockPermissionEventRemove an event-level block for a member.
PermissionEventKickPermissionEventKick a member from the event (one-time removal).