You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|event `String`|**Required** <br> The name of the event you wish to trigger. |
177
+
|data `JSONable data`|**Required** <br> The event's payload |
178
+
179
+
|Return Values |Description |
180
+
|:-:|:-:|
181
+
|buffered_events `Dict`| A parsed response that includes the event_id for each event published to a channel. See example. |
182
+
183
+
`Pusher::trigger` will throw a `TypeError` if called with parameters of the wrong type; or a `ValueError` if called on more than 100 channels, with an event name longer than 200 characters, or with more than 10240 characters of data (post JSON serialisation).
184
+
185
+
##### Example
186
+
187
+
This call will send a message to the user with id `'123'`.
To authenticate users on Pusher Channels on your application, you can use the authenticate_user function:
322
+
323
+
|Argument |Description |
324
+
|:-:|:-:|
325
+
|socket_id `String`|**Required**<br> The channel's socket_id, also sent to you in the POST request |
326
+
|user_data `Dict`|**Required for presence channels** <br> This will be a dictionary containing the data you want associated with a user. An `"id"` key is *required*|
327
+
328
+
|Return Values |Description |
329
+
|:-:|:-:|
330
+
|response `Dict`| A dictionary to send as a response to the authentication request.|
TIn order to terminate a user's connections, the user must have been authenticated. Check the [Server user authentication docs](http://pusher.com/docs/authenticating_users) for the information on how to create a user authentication endpoint.
0 commit comments