401 API Key Not Supplied Unless in Header

Hi there, we are running into an issue when deploying to Azure IIS following the guide Rhino - Deployment to Production Servers - the VM is up and running, and attached are screenshots showing that when making the request with RhinoComputeKey and our API key alone we get a 401 error with the message ā€œAPI Key Not Providedā€ but when we make the request using insomnia to add our API Key directly to the header, we get a 200 response with ā€œcompute.rhino3dā€ as the output - even trying to use a Hops element in Grasshopper says ā€œCannot communicate with the serverā€ - is there any way to force the grasshopper worker to add our API key to the headers of the request?

Thanks


Hi Joshua,

Currently, the GrasshopperWorker does not include sending an API Key, as it expects the RhinoCompute instance to run on a Local Machine (not something that is accessible to the internet and requires authentication, like this IIS implementation).

We do have some documentation on how to set this up using a Rhino Compute Server hosted on a server: Connect your app to a Rhino Compute Server.

Please let me know if this helps!

Hi there!

Apologies for the late reply, and thank you for the help! We have a VM running on Azure with Rhino Compute installed and working (mostly) correctly, but we are now running into a slightly weirder problem;

When running a Grasshopper Definition Evaluation, if there is an external hop in the definition we run into a 401 error. I have added the Compute URL and API key as environment variables when starting the Viktor App, and running a regular grasshopper evaluation without a hop works perfectly fine, but its as if the hop within the script cannot make use of the API token, any chance you guys have seen something like this before?

Thanks a ton,
Josh

Hi Joshua,

I personally havenā€™t yet come across this case, but Iā€™ll double check with my colleague who is the real Grasshopper Guru.

The authentication issues have been moved here: