Authentication
Authenticate with Plate-KV using API keys
All API endpoints require authentication using the Authorization header with your API key.
Header Format
Authorization: YOUR_API_KEYRequest Methods
const plateId = "[id]";
const apiKey = "your-api-key";
const baseUrl = "[base-url]";
const response = await fetch(`${baseUrl}/$[id]/keys/mykey`, {
headers: {
"Authorization": apiKey,
"Content-Type": "application/json"
}
});
const data = await response.json();
console.log(data);Error Responses
Missing or invalid authorization returns 401 Unauthorized:
{
"error": "missing_authorization",
"message": "authorization header is required"
}{
"error": "invalid_authorization",
"message": "authorization denied"
}Security Notes
- Keep your API keys secure and never expose them in client-side code
- Rotate keys periodically
- Use HTTPS in production environments
- Implement key validation at the application level
- Store keys in environment variables or secure secret management systems