Unable to Connect Azure Web PubSub Service with Postman WebSocket

698 Views Asked by At

I have generated Client Access URL using Client URL Generator with all access, which is working fine in Quickstart website provided by azure, But if i try the same link in postman websocket gets connected then if i send

{ "type": "joinGroup", "group": "Group1", "ackId": 1 }

to join group Websocket gets disconnected.

1

There are 1 best solutions below

0
Rajesh  Mopati On

Issues while connecting to the Azure Web PubSub service using Postman WebSocket.

  • Check the version of Postman you are using supports WebSocket connections. WebSocket support was added in Postman version 7.2.0, are compatible.

Check the URL that you are using the correct WebSocket URL format for Azure Web PubSub. The URL should start with "wss://" and include the endpoint and hub details.

enter image description here

Azure Web PubSub requires specific headers or authentication tokens for successful WebSocket connections.

  • Check if there are any firewall / network restrictions that preventing the WebSocket connection.

By default, Postman validates SSL certificates. If you are using a self-signed or custom certificate for Azure Web PubSub service , you need to disable SSL certificate verification in Postman's settings.

  • To enable the WebSocket protocol explicitly in Postman. To do this, go to Postman Settings, navigate to the "General" tab, and toggle the "Enable WebSocket" option.

enter image description here

Check the error messages when the WebSocket connection is closed or fails to establish. Azure Web PubSub provides error messages or status codes.

enter image description here

For more information refer to the Blog and MSDoc.