The SaaS Research Agent supports two authentication methods: API Key and OAuth 2.0. These are alternatives — clients can authenticate with either method.
API Key Authentication
All production requests require an API key in the x-api-key header:
Your API key can be restricted by:
– API: Limited to saas-research-api only
– IP Address: Specific IPs or CIDR ranges
– HTTP Referrer: Specific domains (for web apps)
Recommendation: Apply IP restrictions for production keys
Error Codes
Status
Error
Cause
Solution
401
Unauthorized
Missing API key
Add x-api-key header
403
Forbidden
Invalid or expired key
Contact support for new key
403
Forbidden
IP restriction violation
Check your source IP
429
Too Many Requests
Rate limit exceeded
Reduce request rate or upgrade plan
OAuth 2.0 Authentication (Gemini Enterprise)
In addition to API key authentication, the agent supports OAuth 2.0 Authorization Code Grant Flow for integration with Google’s Gemini Enterprise platform via Google Cloud Marketplace.
How It Works
When a customer purchases the SaaS Research Agent on Google Cloud Marketplace and adds it to their Gemini Enterprise instance, the following happens automatically:
Gemini Enterprise reads the agent card and discovers the DCR extension
Gemini Enterprise calls the DCR endpoint with a Google-signed JWT
The agent validates the JWT and returns OAuth 2.0 client credentials
Gemini Enterprise uses these credentials for the OAuth 2.0 Authorization Code flow
On each agent invocation, Gemini Enterprise passes an access token and a signed software_statement
Agent Card Security Configuration
The agent card declares both authentication methods (OAuth 2.0 and API key) as alternatives: