pusher / pusher-websocket-unity

Pusher Channels Unity Client Library
MIT License
27 stars 20 forks source link

How to use private channel? #29

Closed jeansebastienZ closed 3 years ago

jeansebastienZ commented 3 years ago

Hello , i'm trying to understand something . If an user want to trigger an event on a channel he can't if the channel is not private ? So basically the public channel are only - server -> client . Like pushing a notifications to all user.

But basically if i want to push an even from client -> server : HOW TO ? I've already read this one : https://pusher.com/docs/channels/server_api/authenticating-users

But to understand how to set up that's clearly not easy. My aim was to use pusher to let client send message between them even by paying pusher monthly price , but what i understand now is that for private channel i need to set up something more ? Could someone help please .

By the way i'm using unity , so .NET , i precise as the pusher documentation get few .net example .

Regards

benw-pusher commented 3 years ago

but what i understand now is that for private channel i need to set up something more ?

This is correct: in order for clients to subscribe to private channels you would need to provide an auth endpoint that authenticates the subscription request.

It is not possible to trigger client events without using an authenticated channel (private or presence channels).