GET /v1/whoami is the smallest useful check of your API-key setup. It returns the project, environment, and key metadata associated with the credential you sent. It does not exercise a mandate or move value.
Use a key from your server
Follow create a local test project first. In your terminal, setGOL_API_KEY to the test secret you copied. Keep the secret out of source files, browser code, shell history, screenshots, and logs.
Then send the request to your local platform:
"environment": "test". The apiKey object includes the key name, a non-secret hint, and its scopes. It does not return the key secret.