Skip to content
loading...

How do I test protected websocket channels with tools like postman?

github logo ・1 min read  

I have been working on real time messaging using websocket, I have some channels protected but i cannot access them it keeps returning invalid jwt token, How do I pass in the token while using tools like

  • smart websocket client
  • advanced rest client
  • simple web socket client

I am using adonisJs on the backend.

twitter logo DISCUSS (2)
markdown guide
 

you should pass the JWT in query params like ws://myapp.com/?jwt=long_jwt_xyz or if you can set JWT on sub-protocols section of WS config

To test it, you should try Firecamp

Here is how it looks for WS testing...
Firecamp WS

 
Classic DEV Post from Jan 23 '18

Git — commands you need to git going!

First off, let’s ensure git is installed — if not, check the relevant link belo...

Onwubiko Chibuike profile image

DEV Tip: When you see a dev.to post you like, follow the author to get more of their posts in your feed.

Happy Coding ❤️