PrivMX DOCS
API Reference/PrivMX Endpoint Web/Events

EventApi

Class representing instance of Custom Events API

Methods

emitEvent

Emits the custom event on the given Context and channel.

Params

contextId

string

ID of the Context

channelName

string

name of the Channel

eventData

Uint8Array

event's data

users

UserWithPubKey[]

list of UserWithPubKey objects which defines the recipients of the event

emitEvent(contextId, channelName, eventData, users)

Returns

`` · undefined undefined

subscribeForCustomEvents

Subscribe for the custom events on the given channel.

Params

contextId

string

ID of the Context

channelName

string

name of the Channel

subscribeForCustomEvents(contextId, channelName)

Returns

`` · undefined undefined

unsubscribeFromCustomEvents

Unsubscribe from the custom events on the given channel.

Params

contextId

string

ID of the Context

channelName

string

name of the Channel

unsubscribeFromCustomEvents(contextId, channelName)

Returns

`` · undefined undefined

We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.