Helper method that builds the final URL. It will append the authorization and payload arguments as query parameters. This method can be used for both the HTTP URL and the WebSocket URL