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)
| Permission | Implied By | Description |
|---|---|---|
PermissionChat | — | Grants all chat capabilities below. |
PermissionChatBlock | PermissionChat | Block a member from using chat. |
PermissionChatUnblock | PermissionChat | Remove a chat block for a member. |
PermissionChatMute | PermissionChat | Mute a member (they cannot send messages). |
PermissionChatUnmute | PermissionChat | Unmute a member. |
PermissionChatMessageDelete | PermissionChat | Delete messages in chat. |
PermissionChatKick | PermissionChat | Kick a member out of the chat. |
permissionChatSlowmodeBypass | PermissionChat | Bypass slowmode restrictions when sending messages. |
Event permissions (300–399)
| Permission | Implied By | Description |
|---|---|---|
PermissionEvent | — | Grants general event management capabilities below. |
PermissionEventBlock | PermissionEvent | Block a member from the event (deny access). |
PermissionEventUnblock | PermissionEvent | Remove an event-level block for a member. |
PermissionEventKick | PermissionEvent | Kick a member from the event (one-time removal). |