Search code examples
aws-lambdaaws-api-gateway

AWS WebSocket API return forbidden (403) error when sending message


Created AWS API Gateway WebSocket and try to send message from React APP. It throw an error when try to send messages. I checked all the routes are correct and there is not any authentication configured.

But stil it throw forbdding errors. I can connect to the websocket.

I am expecting to send messages and it should receive by a lambda function


Solution

  • You are not sending the valid payload. The message should be in a json format. More info: https://youtu.be/EZrXBnca4KY