"Api Key was not provided." despite including API key in header

Hi @AndyPayne

I’m getting an “Api Key was not provided.” whenever I try to access my compute aws server. Pinging the server works fine but I’m running into the issue with the /version and /healthcheck endpoints and with both GET and POST.

For debugging, I tried sending the RhinoComputeKey using Postman with the same result. I also tried changing the API key in the VM environmental variable.

Hi @NBB Did you get resolved on this ? I am hitting this same issue for my Azure VM setup.

I’ve attached a screenshot of how I usually setup Postman to send a GET request to my VM. The first thing is setting up the correct address… it should be a GET request sent to the IP address of your VM, then a colon and then the port number 80 and finally followed by the endpoint you want to hit. In this case, I’m sending a test request to the /healthcheck endpoint. Also, then notice that I’ve clicked on the Headers tab and created a new Key called RhinoComputeKey and then in the Value section you would enter the API key that you provided during the bootstrap script. If you can’t remember this, you can find it as one of the entries in your Environment Variables on the VM. If you send this with all the proper info, hopefully you’ll receive a “Healthy” message returned.

The /healthcheck endpoint just reports on the status of the main rhino.compute webserver on the VM… but by default the main process which handles the execution of commands is the compute.geometry project. The main rhino.compute project handles spinning the child processes of compute geometry up and down as needed. To test if the children are working, I would then recommend sending a second request to the endpoint /activechildren. This will return an integer value of the number of child processes that are currently running. The default should be 4… I do want to note that if the server is just starting up these children, the response time can take a little while (as it’s essentially launching four instances of rhino/grasshopper in the background).

1 Like

Thanks Andy - i just didn’t realise that Compute had been updated to require the API key in every call - it used to have some open api points such as /version /sdk etc and i have been in the habit of using my browser to quickly check these endpoints to confirm my older server install was responsive.
Thanks and sorry for silly query.