Configuring Third-Party AlgodClient Connection

Hey all, I just set up a participation node on QuickNode. I want to connect to its AlgodClient to unload some resources off of my local machine as I develop my app on the TestNet with Java. The service give me URL with the token as a part of the directory. When I used this hostname, token, and tested a few ports to construct the AlgodClient instance, I get timed out. The method call metrics on the QuickNode dashboard don’t seem to show any activity either. The URL takes the form of “your-node-here.algorand-testnet.quicknode.pro/averylongalphanumerictokenrighthere/algod/”. I opted to remove the token, making the node temporarily public to circumvent the authentication, yet I still can’t seem to connect. I’ve tried ports 80, 8080, and 4001 thus far. 80 gives an SSL error, 8080 gives a Read Timeout error and 4001 simply says Connection Timed Out. As for the QuickNode analytics it only displays HTTP calls. I have a feeling I’m just configuring wrong, but there’s not much documentation available for setting up Algorand on QuickNode. Any help is appreciated. Thanks.

private static AlgodClient connectToNetwork() {
		//Public Access
		final String ALGO_API_HOST = "https://your-node-name.algorand-testnet.quiknode.pro/algod/";
		//final String ALGO_API_TOKEN = "";
		final int ALGO_API_PORT = 4001;
		/*
		Token Authentication Access
		final String ALGO_API_HOST = "https://your-node-name.algorand-testnet.quiknode.pro/averylongalphanumerictokenaboutthislength/algod/";
		final String ALGO_API_TOKEN = "averylongalphanumerictokenaboutthislength";
		final int ALGO_API_PORT = 4001;
		 */
		return new AlgodClient(ALGO_API_HOST, ALGO_API_PORT, "");
	}

Have you changed the EndpointAddress in config.json to allow connections from 0.0.0.0 instead of just localhost ?

See API Connection Refused - #5 by fabrice and Can't reach Algorand Docker container from another container - #2 by fabrice

While I was looking into your solution, I learned some curl. I found out QuickNode doesn’t give access to configuration, or I haven’t learned how to expose it in their API yet. Regardless, I got connected, and I misunderstood some of the moving parts. In case anyone is wondering, the port QuickNode listens on is 443. Here’s my process for QuickNode.

import com.algorand.algosdk.v2.client.common.AlgodClient;
AlgodClient client = new AlgodClient("your-node-name.algorand-testnet.quiknode.pro/algod/", 443);
client.GetStatus().execute(); // GET ./v2/status 

REST API equivalent

GET your-node-host.algorand-testnet.quiknode.pro/algod/v2/status/

in curl:

curl -X 'GET' 'your-node-host.algorand-testnet.quiknode.pro/algod/v2/status' -H 'accept:application.json'

As for the port and additional information, I took note from the output of this:

curl --verbose 'your-node-host.algorand-testnet.quiknode.pro/algod/'

Hope this helps someone extrapolate a solution for a similar issue. Also, thanks @fabrice for pointing me in the right direction.