What data am I sending wrong in this request to broadcast a message?

Thank you. I think the problem is how I am encoding the secret. I generated the jwt token in http://www.jwt.io and with that it works.

For testing purposes I will leave it like that for now since the next messages will have to be sent from the EBS, so for now I don’t worry anymore

I tried that example before but I don’t know which library you use for jwt.sign so I installed https://www.npmjs.com/package/jwt-simple and it said “Uncaught TypeError: _jwtSimple2.default.sign is not a function” so for now I will leave it with it working with the token from that link, I hope the backend works better.

The thing is that it was in fact the problem in the token, and not some other issue that was returning the same error, so I can rest for now.