Request gateway port with api?

It’s possible request the gateway port to show the files ?

By default the gateway port is 8080, but many gateways change

In this case, they use port 80.

It’s possible to request this port using the ipfs api ?

Can returns something like

Sorry, I didn’t get your question.

Edited. I would like to know if it’s possible request the gateway port with ipfs API.

You can always change the port for the gateway.
So, yes, it’s possible to host a gateway using any port and hence get data from it.

You can request the entire config using curl localhost:5001/api/v0/config/show

1 Like

I think the question is not about configuring one’s gateway, but to know on what port connecting to a remote, out-of-our-control getaway.
I have no control over but I know it’s a getaway. Connecting to gives an error (because it should be port 80). I guess the question is: how can I ask to tell me on what port I should connect to it (so it answers “Connect on port 80. The default 8080 won’t work”)?

1 Like

Thank you,! this works in my local node.
But unfortunally does not work with some remote nodes, like this:

They’re probably limiting which parts of the API they expose over the network. In that case, there’s really nothing you can do.