Authentication

Secure your API requests with API keys or OAuth 2.0.

API Key Authentication

Include your API key in the Authorization header of every request:

curl https://api.greencode.ai/v1/scans \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Security Best Practices

  • Never expose your API key in client-side code
  • Rotate API keys regularly
  • Use environment variables to store keys
  • Implement rate limiting on your end
  • Monitor API usage for suspicious activity