Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pusher websocket URL triggering events and sending data #387

Open
sushilsth opened this issue May 18, 2024 · 2 comments
Open

Pusher websocket URL triggering events and sending data #387

sushilsth opened this issue May 18, 2024 · 2 comments
Labels

Comments

@sushilsth
Copy link

I am trying to trigger events and send data to websocket URL on the specific public channel. I am currently testing in postman. I am able to connect to websocket URL and subscribe to the channel but cannot trigger events and send data to the event.

Here is what I have tried. I can connect to websocket URL and subscribe to the channel as screenshot below.

image

Now when I try to trigger event and send data, it throw the error as marked in screenshot below. Here is the error in pusher response Unsupported event received on socket: my-event"

image

As per the official docs of pusher https://pusher.com/docs/channels/library_auth_reference/pusher-websockets-protocol/#channel-events-pusher-channels-greater-client,

This should be the correct way to trigger events but it is not working. Can anyone help me with this?

Thank you

@benw-pusher
Copy link

The docs you link to show the format of the event as sent from our service to a client. To trigger an event we have an API endpoint - https://pusher.com/docs/channels/library_auth_reference/rest-api/#post-event-trigger-an-event.

You may also be able to send an event with your current approach by prefixing the event name with client-. Client events are events sent directly from a client. https://pusher.com/docs/channels/using_channels/events/#triggering-client-events

Copy link

stale bot commented Feb 1, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you'd like this issue to stay open please leave a comment indicating how this issue is affecting you. Thank you.

@stale stale bot added the wontfix label Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants