block-quote On this pagechevron-down
GitBook Assistant Ask chevron-down Getting Started Authentication All requests to the Guardis API require authentication using your API key. The method for including your key varies depending on the protocol you're using.
Don't have an API key yet? Contact us at [email protected] envelope to request access.
For all REST requests, include your API key in the X-API-Key header.
Header format:
Copy X-API-Key: your_api_key_here Example request:
Copy curl -X GET " https://enterprise.guardis.io/v1/endpoint " \
-H " X-API-Key: your_api_key_here " For WebSocket connections, include your API key as a query parameter when establishing the connection.
Connection format:
Copy wss://api.guardis.io/v1/ws?api_key=your_api_key_here Example (JavaScript):
For gRPC requests, include your API key in the request metadata using the x-api-key field.
Metadata format:
Example (Python):
Example (Go):
Keeping Your API Key Secure
Your API key grants access to your Guardis account and usage quota. Treat it like a password.
Never expose your key in client-side code — API calls should be made from your backend
Don't commit keys to version control — Use environment variables or a secrets manager
Authentication Errors
If your API key is missing, invalid, or expired, you'll receive an error response.
API key is missing or invalid
API key is valid but lacks permission for this resource
See the Errors section for full details on error handling.
Last updated 3 months ago