0

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.

  • Postman can connect web pages with HTTP/HTTPS not to the web WebSocket directly as far as I know. have to try this with this [URL](https://i.imgur.com/hX0jFfO.png) in postman . we can use the Azure function to connect to the web socket. Reference for Azure function connected with the [webPubsub](https://learn.microsoft.com/en-us/azure/azure-web-pubsub/tutorial-serverless-notification?tabs=javascript). – Sampath May 26 '23 at 01:38
  • Hi, Thanks for the comment postman has websocket feature recently introduced, i have also tried with other 3rd party websocket connection services, the url in the screen shot will do the back end work for sending specific json format. since i am trying to build an application and integrate azure pubsub, i would like to know the exact backend format to join group and send messages. which i am not able to test. – GowthamKishore May 26 '23 at 10:41
  • could you share the Postman WebSocket feature-related doc, the backend c#, or Python? – Sampath May 26 '23 at 10:57
  • https://learning.postman.com/docs/sending-requests/websocket/websocket/#:~:text=You%20can%20create%20a%20WebSocket%20request%20from%20the%20sidebar%20in,N%20or%20Ctrl%2BN.) I have tried in below website too https://websocketking.com/ – GowthamKishore May 26 '23 at 11:06
  • since it is still in beta it has bugs. I tested sending messages as well it disconnected. hope we should wait for wait new standard version role out. if you need any of the backend c#, or Python or let me know – Sampath May 26 '23 at 13:41

1 Answers1

0

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.

Rajesh Mopati
  • 1,329
  • 1
  • 2
  • 7