Openapi 401 Unauthorized reponse

I have been using the open api’s from the gateway, which i got to work on a test server, but when it was transferred to a different server with the same settings then i get the 401 Unauthorized response.

The test gateway was run on a normal Laptop inside a virtual machine in a windows environment.

The new server is almost the same, but now it is hosted by a 3rd party in a windows server environment inside a virtual machine.

Since the only difference is that the gateway is hosted on a windows server, so I was thinking if could have anything to do with the server we are hosting it from.

Could it be a firewall issue?

How? API keys are a gateway configuration resource, so the most likely explanation is that the transfer did not include or otherwise mangled the API key configuration.

A network/firewall issue is unlikely to result in a 401 error, unless there's middleware such as a reverse proxy between wherever you're issuing requests from and the actual Ignition gateway. If there is, all bets are off, because almost anything could be going wrong on the network path.

Rest assured that the API works absolutely fine on a windows or linux host.

2 Likes

How? API keys are a gateway configuration resource, so the most likely explanation is that the transfer did not include or otherwise mangled the API key configuration.

I should probably have explained that a bit more clear.
When the transfer was done, the server gateway settings was manually setup, where we went over what settings we used on our test gateway and setup the same settings on the new server.

The API key is a different one, a newly generated one, but with the same settings as on the test server.

A network/firewall issue is unlikely to result in a 401 error, unless there's middleware such as a reverse proxy between wherever you're issuing requests from and the actual Ignition gateway

I’l look into if there is a reverse proxy to our windows server.